[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?
Thomas Hartman
tphyahoo at gmail.com
Fri Apr 30 16:37:38 EDT 2010
*Main> :t Data.Text.IO.readFile
Data.Text.IO.readFile :: FilePath -> IO T.Text
but
*Main> :t Data.Text.Lazy.IO.readFile
Data.Text.Lazy.IO.readFile
:: FilePath -> IO text-0.7.1.0:Data.Text.Lazy.Internal.Text
why does the lazy version use the internal type, whereas the strict
version of Text IO just using plain Data.Text type?
and how can I get from internal type to regular type when using Data.Text?
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-Text-Lazy-IO.html
ghc-pkg list | grep -i text
text-0.7.1.0
thanks for any help!
More information about the Haskell-Cafe
mailing list