
1 Mar
2006
1 Mar
'06
11:30 a.m.
Hello Ben, Wednesday, March 1, 2006, 6:23:00 PM, you wrote:
instance (Show a) => IsXML a where toXML = toXML . show
The intention of the latter is to be a default instance unless another instance is specified.
BRG> I can see how this is useful, but I'm surprised that it's robust. None of BRG> the extensions people have suggested to avoid overlap would help here, clearly. no problem: precedence 1 : instance (Show a) => IsXML a where ... precedence 9 : instance IsXML String where ... of overlapping instances, win the one with higher precedence -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com