[Yhc] Re: Crashing Queens

Tom Shackell shackell at cs.york.ac.uk
Wed Aug 29 05:45:12 EDT 2007


Neil Mitchell wrote:
> Hi
> 
> The reason, as Matt discovered, is that it has module Queens where,
> not module Main where. Could we perhaps get a better error message on
> this one?

Or more precisely ...

>> main = nsoln 9

>> nsoln :: Int -> Int

therefore main :: Int, which funnily enough the runtime doesn't like.

The only solution would be include some kind of flag in the bytecode 
saying "this function can be used as a main function because it has the 
right type". Functions do have a flags field and at the moment it's 
largely unused so it would certainly be possible.

Cheers


Tom


More information about the Yhc mailing list