a trap for the unwary
Malcolm Wallace
Malcolm.Wallace@cs.york.ac.uk
Fri, 1 Dec 2000 11:03:58 +0000
Today, I thought I had discovered a bug in ghc. Then I tried hbc
and Hugs, and they also rejected my program with the same error.
nhc98 alone accepts it without complaint. I looked up the Report,
and it seems that the program is indeed incorrect.
Quick quiz: without running this through a compiler, who can spot
the mistake? :-)
> module Main where
> import Char
> f x = y
> where
> y | isSpace x = True
> y | otherwise = False
> main = print (f 'x')
Regards,
Malcolm