I want to read a text file, and store it in a *String*. But readFile will
get *IO String*. I search with google and they tell me it is not
necessarily to do so. Can you explain to me why is this? Furthermore, How
to read a file and store it in a String?

In fact, I want to read a file and split it into *[String]* with
*lines*function. Here is what I have tried.
link<https://github.com/eccstartup/findDict/blob/master/src/Data/Dict/Utils.hs>I
think I could directly operate on
*[String]*. But it is not true for me.


[1] http://www.haskell.org/hoogle/?hoogle=IO+String+-%3E+String


Yi Lu
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to