
22 Jun
2004
22 Jun
'04
8:29 a.m.
data E a b = L1 { r :: a } | L2 { r :: a } | L3 { r :: a } | L4 { r :: a } | R b deriving Show
How is this different from: data E a b = L1 a | L2 a | R b f g (R a) = R (g a) f _ other = other Isn't this more or less what was in the original... The problem is the type: f :: (a->b) -> Either String a -> Either String b this line: f _ other = other says: Either String a == Either String b -- which it doesn't Keean.