I'm reading the book "The Haskell Road to Logic, Math and Programming" and I download their code from the second chapter(http://homepages.cwi.nl/~jve/HR/), but when I try to compile the code, it doesn't work.
The error message is:
TAMO.hs:85 - Syntax error in instance head (variable expected)
What variable is expected? I've never used Haskell before and have no idea what the compiler(Hugs) want me to do to fix it.
class TF p where
valid :: p -> Bool
lequiv :: p -> p -> Bool
instance TF Bool
where
valid = id
lequiv f g = f == g
instance TF p => TF (Bool -> p)
where
valid f = valid (f True) && valid (f False)
lequiv f g = (f True) `lequiv` (g True)
&& (f False) `lequiv` (g False)