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.


_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to