Closed mitchellwrosen closed 9 years ago
I believe you want to use Message instead of Value. On Oct 5, 2015 3:51 PM, "Mitchell Rosen" notifications@github.com wrote:
What's the recommended way of deriving Encode/Decode instances for messages that are built from other messages? The straightforward standalone deriving doesn't quite work, because it requires an EncodeWire/DecodeWire instance:
data Foo = Foo (Required 1 (Value Bar)) deriving (Generic, Show)instance Encode Foo -- No instance for EncodeWire Bar data Bar = Bar (Required 1 (Value Text)) deriving (Generic, Show)instance Encode Bar
— Reply to this email directly or view it on GitHub https://github.com/alphaHeavy/protobuf/issues/23.
Oh! Didn't see that =) Thanks!
No problem :) On Oct 5, 2015 3:54 PM, "Mitchell Rosen" notifications@github.com wrote:
Oh! Didn't see that =) Thanks!
— Reply to this email directly or view it on GitHub https://github.com/alphaHeavy/protobuf/issues/23#issuecomment-145691712.
What's the recommended way of deriving
Encode
/Decode
instances for messages that are built from other messages? The straightforward standalone deriving doesn't quite work, because it requires anEncodeWire
/DecodeWire
instance: