
16 Sep
2004
16 Sep
'04
5:09 p.m.
This should *not* display anything. Look at the types! displayFile1 returns a value that is the "displaying action". It does not "run" it. Replace "liftM" with "(=<<)" or use "join displayFile1" if you want to run the displaying action. mike
displayFile1 :: IO (IO ()) displayFile1 = liftM putStr contents -- Displays nothing where contents :: IO [Char] contents = readFile "DisplayFile.lhs"
This should display the contents of a file, but nothing appears.