[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


*Main> :t Data.Text.Lazy.IO.readFile
  :: FilePath -> IO 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:

ghc-pkg list | grep -i text

thanks for any help!

More information about the Haskell-Cafe mailing list