I should add that I do seem to have written something that sort of works: firstChar :: [a] -> IO a firstChar xs = return head xs then, readFile "/tmp/foo" >>= firstChar >>= putChar ...however, I can believe that