Christian Stryczynski

Freelance software developer. Haskelling at night. Hopefully unconventional. Fan of Dvorak

Haskell String vs Text Overview

So essentially Haskell has two main "Letter related" types -  String, and Text - and they have performance differences. 

It also has a language extension called OverloadedStrings to automatically 'convert' "Example" into String or Text

It is such an annoying issue, from my vague small understanding - Text would be much better to be a default type inferred on "Example"

Here is an possible work around to have Text as the default:

There is also TWO (WTF WHY!?!?) libraries that help converting to String / Text:

My opinion is just go with string-conversions (it has more downloads)

It has been discussed numerous times on reddit:

Written by Christian Stryczynski on Monday December 18, 2017

Permalink -

« Cheapest 4K compatible graphics card - My Projects »