
Could someone help me point out the problem here? The relevant code is:
instance XMLGen m => EmbedAsChild m (XML m) where asChild = return . return . xmlToChild
class XMLGen m => EmbedAsChild m c where asChild :: c -> GenChildList m
class Monad m => XMLGen m where type XML m ....
Eh, reading that again I realize there's a bit code needed to understand the above. So here's *really* the relevant code: ---------------- class Monad m => XMLGen m where type XML m data Child m xmlToChild :: XML m -> Child m [....] class XMLGen m => EmbedAsChild m c where asChild :: c -> GenChildList m instance XMLGen m => EmbedAsChild m (XML m) where asChild = return . return . xmlToChild ---------------- ... and just a note that GenChildList is a type synonym for a certain monad returning a list, hence the double returns. :-) Cheers, /Niklas