On Fri, Dec 14, 2012 at 9:57 AM, Emmanuel Touzery <etouzery@gmail.com> wrote:
    I expected "read" to work directly on a Data.Text because Data.Text has an instance of the Read class, but it seems to fail:

An instance of Read means that read can *produce* a Text, not that it can consume one.  read always reads from a String, as you can see from its type:

    Prelude Data.Text> :t read
    read :: Read a => String -> a

(Note that it is the result type a in the context for Read.)

See the Data.Text.Read module (part of the text package you already have installed) for how to do similar things with a Text as a source.

--
brandon s allbery kf8nh                               sine nomine associates
allbery.b@gmail.com                                  ballbery@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net