[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?

Felipe Lessa felipe.lessa at gmail.com
Fri Apr 30 18:58:23 EDT 2010


On Fri, Apr 30, 2010 at 11:09:05PM +0200, Daniel Fischer wrote:
> Hmm,
>
> Prelude> :t Data.Text.Lazy.IO.readFile
> Data.Text.Lazy.IO.readFile
>   :: FilePath -> IO text-0.7.1.0:Data.Text.Lazy.Internal.Text
> Prelude> :t Data.Text.IO.readFile
> Data.Text.IO.readFile
>   :: FilePath -> IO text-0.7.1.0:Data.Text.Internal.Text

It depends on what is on your scope:

  Prelude> :t Data.Text.Lazy.IO.readFile
  Data.Text.Lazy.IO.readFile
    :: FilePath -> IO text-0.7.1.0:Data.Text.Lazy.Internal.Text

  Prelude> :m Data.Text.Lazy
  Prelude Data.Text.Lazy> :t Data.Text.Lazy.IO.readFile
  Data.Text.Lazy.IO.readFile :: FilePath -> IO Text

HTH,

--
Felipe.


More information about the Haskell-Cafe mailing list