layout ambiguity

Edmund GRIMLEY EVANS Edmund.Grimley-Evans@arm.com
Thu, 2 May 2002 10:09:05 +0100


This program gives different answers with Hugs and GHC. I think Hugs
is wrong here: see section 2.7 of the Report, the sentence containing
"{}". It wouldn't surprise me if GHC is wrong, too.

You might say it's a bad program, so Hugs and GHC can both do whatever
they want to, but I'd be a lot happier if at least one of them could
signal an error. Can someone make Hugs give an error in cases like
this?

Edmund


a = "ghc"

main = print (f "hugs")
    where f a = y where
        y = a