
26 Mar
2019
26 Mar
'19
11:35 p.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?