data Logic a b = Or a b
| And a b
| Xor a b
| NOr a b
| NAnd a b
instance Show Logic where
show (And a B)/>="(" ++ show(a) ++ "And" ++ show(B)/> ++")"
show (Or a B)/> = "(" ++ show(a) ++ "or" ++ show(B)/> ++")"
show (Xor a B)/> = "(" ++ show(a) ++ "Xor" ++ show(B)/> ++")"
show (NOr a B)/> = "(" ++ show(a) ++ "NOr" ++ show(B)/> ++")"
show (NOr a B)/> = "(" ++ show(a) ++ "NAnd" ++ show(B)/> ++")"
I get the following error:
'Logic' is not applied to enough type arguments
Expected kind '*', but 'Logic' has kind * - > * - > *'
In the instance delaration for 'Show Logic'
Any help would be appreciated.
This post has been edited by s243a: 17 March 2010 - 03:26 PM

New Topic/Question
Reply



MultiQuote



|