Re: The simplest program

2003-02-14 Thread Axel Simon
On Thu, Feb 13, 2003 at 03:41:13PM +0100, Wolfgang Thaller wrote: > The current HEAD is not able to compile the simplest of all Haskell > programs... but I don't think the bug affects anyone. > Compiling > > > module Main where > > main = return () > > yields > > Main.hs:1: > Ambiguous type

RE: The simplest program

2003-02-14 Thread Simon Peyton-Jones
on (Is it a known bug? If | not, it should be reported), but returning anything is allowed. I didn't know about this. This works OK: main = return "foo". So can you give me an example that fails. I'll attend to the "simplest program" problem. Simon

Re: The simplest program

2003-02-13 Thread Wolfgang Thaller
Axel Simon wrote: This bug is older! ghc 5.04 does not enforce that the return type of main is (). In fact with 5.04 you can return anything you want and get very fancy exception on termination if you return a more complex data type. I don't know about an exception on termination (Is it a known

The simplest program

2003-02-13 Thread Wolfgang Thaller
The current HEAD is not able to compile the simplest of all Haskell programs... but I don't think the bug affects anyone. Compiling > module Main where > main = return () yields Main.hs:1: Ambiguous type variable `m' in these top-level constraint `Monad m' arising from use of `return'