I haven't looked at your code since I'm on a mobile, but classy-prelude, of which I'm one of the maintainers, does provide functions that generally work with the Text data type.


On Sat, Feb 28, 2015, 1:24 PMĀ Bram Neijt <bneijt@gmail.com> wrote:
Dear reader,

I wrote some tiny code to parse files into json (to automate escaping
multi-line text).

It quickly became a collection of "import qualified" and "T.unpack,
T.pack" calls that made the whole thing look ugly [1].

What "alternative prelude" would help in getting clean code when
combining "aeson" and reading text files?

Greetings,

Bram

[1] Source can be read here: https://gist.github.com/bneijt/9bdb4b1759790a8463c9
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe