
4 Sep
2013
4 Sep
'13
10:21 a.m.
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. linkhttps://github.com/eccstartup/findDict/blob/master/src/Data/Dict/Utils.hsI 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