Not having your reply address, I could only reply to the list. :)

> how to make Haskell to feed a line ?
> In Haskell  (ghc-0.25)  I tried
> main =  print     "ab\ncd"

The output should be "ab\ncd", including the double quote,
and it seems to be the right thing expected by the standard
prelude. "print" calls "show", which in turn calls the
class printing method of type Char. Tracing down, you'll
reach the function "showLitChar" which returns "\\n"
when the output character is "\n".

> main =  writeFile "result" "ab\ncd" exit done
> and obtained   ab\ncd

I tried this with 0.26. It generated desired output
containing newline character.

Oh, the monadic version should also work fine.

  main = putStr "ab\ncd"

sincerely,
Shin-Cheng Mu


Reply via email to