[GHC] #1442: ghc and ghci differs in deailing with "undefined" with I/O

GHC trac at galois.com
Wed Jun 20 17:05:23 EDT 2007


#1442: ghc and ghci differs in deailing with "undefined" with I/O
-----------------------+----------------------------------------------------
  Reporter:  guest     |          Owner:         
      Type:  bug       |         Status:  new    
  Priority:  normal    |      Milestone:         
 Component:  Compiler  |        Version:  6.6.1  
  Severity:  major     |       Keywords:         
Difficulty:  Unknown   |             Os:  Unknown
  Testcase:            |   Architecture:  Unknown
-----------------------+----------------------------------------------------
This program:
 {{{
 main = putStrLn ("x == " ++ undefined)
 }}}

 produces the following expected output with ghci:
 {{{
 x == *** Exception: Prelude.undefined
 }}}

 but when compiled with ghc and run, it gives:
 {{{
 $./a.out
 a.out: Prelude.undefined
 }}}

 we observed this in all the way back to ghc6.2.1; possibly earlier.

 The semantics of error reporting in combination with I/O is murky;
 admittedly laziness is observable at the top-level when errors are
 reported. But at least ghc and ghci should do the same thing. And the
 behavior of ghci seems to be more appropriate.

 Thanks!

 Jeff Lewis and Levent Erkok

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1442>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
-------------- next part --------------
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs at haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


More information about the Glasgow-haskell-bugs mailing list