Who knows, please, how to work with the program of

  main = interact (\ s -> shows (read s :: Bool) "\n")


in the interpreter  ghci  ?

This is on                       ghc-cvs-6-4-branch-June-15-2005
under Debian Linux, i386-uknown.  

When compiled, it works:   > ghc --make ReadBug
                           > ./a.out
                           > True   press Enter
                           >        press Control-d
                           > True

And it does not work under ghci:  

--------------------------------------------------  
> ghci ReadBug.hs
  
 ___         ___ _
  / _ \ /\  /\/ __(_)
 / /_\// /_/ / /  | |      GHC Interactive, version 6.4.1, for Haskell 98.
/ /_\\/ __  / /___| |      http://www.haskell.org/ghc/
\____/\/ /_/\____/|_|      Type :? for help.

Loading package base-1.0 ... linking ... done.
Compiling Main             ( ReadBug.hs, interpreted )
Ok, modules loaded: Main.
(0.08 secs, 3210432 bytes)
*Main> main
True
^D*** Exception: Prelude.read: no parse
*Main>
------------------------------------------------


Is this a GHC bug?

Regards,

-----------------
Serge Mechveliani
[EMAIL PROTECTED]
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to