
27 Mar
2019
27 Mar
'19
3:35 a.m.
Hi, I am trying to read data from a file. When I do- ghci> contents <- readFile "file.txt" ghci> words contents Then everything works. The same thing when done in a .hs file gives an IO String vs [String] error. Why is that so?