runghc printing result of main when main is not IO ()

Tomasz Zielonka tomasz.zielonka at gmail.com
Wed Aug 29 11:58:02 EDT 2007


Hello!

Consider:

$ cat R.hs 
main = return [()]
$ runghc R.hs 
[()]

This was a bit surprising for me, because I thought that runghc
mimics the way a compiled program behaves.

Best regards
Tomek


More information about the Glasgow-haskell-bugs mailing list