
27 Apr
2008
27 Apr
'08
2:11 p.m.
Iavor Diatchki wrote:
Hello, How about defining the types like this:
data PVal a = Unit a | Array [a] data Val = IntVal (PVal Int) | BoolVal (PVal Bool) -- | etc
instance Serialize Int where ... instance Serialize a => Serialize (PVal a) where ... instance Serialize Val where ...
Thanks, but its not quite what I'm looking for. It gives an AMQP "array" of Int8 the same type as an AMQP "variant" containing an Int8. I'd prefer them to have distinct types. Paul.