[Haskell-cafe] [ANN] protobuf-simple: Protocol Buffers library
Andrey Sverdlichenko
blaze at ruddy.ru
Tue Apr 5 14:56:09 UTC 2016
Isn't http://hackage.haskell.org/package/protocol-buffers doing the same
thing with records?
On Tue, 5 Apr 2016 at 07:30, Martijn Rijkeboer <mrr at sru-systems.com> wrote:
> > How does this compare to https://hackage.haskell.org/package/protobuf?
>
> It uses "simpler" types. The Foo type in protobuf would be like
> the following (from the manual):
>
> data Foo = Foo
> { field1 :: Required 1 (Value Int64)
> , field2 :: Optional 2 (Value Text)
> , field3 :: Repeated 3 (Value Bool)
> } deriving (Generic, Show)
>
>
> In protobuf-simple it would be like the following:
>
> data Foo = Foo
> { field1 :: Int64
> , field2 :: Maybe Text
> , field3 :: Seq Bool
> } deriving (Show, Eq, Ord)
>
>
> Besides this, protobuf-simple uses newtypes for messages with only one
> field (something we use very often).
>
> Kind regards,
>
>
> Martijn Rijkeboer
>
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20160405/2229a37e/attachment.html>
More information about the Haskell-Cafe
mailing list