No error report, on invalid data declaration

Neil Mitchell ndmitchell at gmail.com
Tue Aug 22 17:02:46 EDT 2006


Hi,

With the code:

> import qualified Data.Map as Map
> data Test = Map.Map Int Int

There is no error at compile time by Hugs. There is in GHC:

test.hs:6:12: Not in scope: data constructor `Map.Map'

Of course, the GHC error message is not really very good, but Hugs
compiles it fine - I have no idea what the runtime behaviour is. I
guess this is an invalid Haskell program, and Hugs is at fault?

Thanks

Neil


More information about the Hugs-Bugs mailing list