[Haskell-cafe] why does Data.Text.Lazy.IO.readFile return the internal type Data.Text.Lazy.Internal.Text, when Data.Text.IO.readFile returns plain IO Data.Text.Text?

Edward Kmett ekmett at gmail.com
Fri Apr 30 17:20:59 EDT 2010


On Fri, Apr 30, 2010 at 5:09 PM, Daniel Fischer <daniel.is.fischer at web.de>wrote:
> and how can I get from internal type to regular type when using
>
> > Data.Text?
>
> Use id :: a -> a
> ;)
>
> Not quite, there is still a distinction between Data.Text(.Internal).Text
and Data.Text.Lazy(.Internal).Text.

but the machinery to work with the results he gets back are found in
Data.Text.Lazy including the functions to turn it into a list of strict Text
fragments.


> >
> > also the internal type doesn't appear to be reflected in the haddock:
> >
> > http://hackage.haskell.org/packages/archive/text/0.7.1.0/doc/html/Data-T
> >ext-Lazy-IO.html
>
> Follow the 'Source' link at Data.Text.Lazy.Text, that sends you to
> http://hackage.haskell.org/packages/archive/text/0.7.1.0/doc/html/src/Data-
> Text-Lazy-Internal.html#Text
>
> >
> > ghc-pkg list | grep -i text
> >     text-0.7.1.0
> >
> > thanks for any help!
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20100430/96269135/attachment.html


More information about the Haskell-Cafe mailing list