hg.manuel:
> Dear Haskellers,
>
> why this program is not accepted by Hugs?
>
> equal a a = True
> equal a b | not(a==b) = False
You can't pattern match 'a' and 'a' like that -- there's no implicit
unification.
Instead, I'd write:
equal a b
| a == b = True
| otherwise = False
Well actually, maybe I'd write:
equal a b = a == b
In reality, though:
equal = (==)
And then I'd just use (==) directly :)
Cheers,
Don
_______________________________________________
Haskell mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell