Martijn van Steenbergen wrote:
It doesn't work for this one:
newtype Split a = Split { runSplit :: [Either a (Char, Split a) ]}
But my handwritten instance remains identical.
The instance has the form [], not the form [Either _ (Char, Split _)].
Since they don't match exactly, it won't give you an instance
automagically. It could have been the case that you intended some other
instance besides []'s. All generalized newtype deriving does is derive
instances for newtypes that wrap exactly what the instance is defined over.
- Jake
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe