> I can't remember having seen anything like this before.
> The following program compiles fine with ghc2.0699999999999998
> 
> > module Main( main ) where
> 
> > main = return ()
> >        where 0 = 1

Looks fine to me.  The pattern "0" is matched lazily, that is
when any of its free variables are evaluated.  Since it has none
it is never matched.

Curious as it seems, it's legal Haskell.

Simon

  • 0 = 1 Marc Dongen
    • Simon L Peyton Jones

Reply via email to