>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.
_______________________________________________
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to