[Haskell-cafe] [ANN] protobuf-simple: Protocol Buffers library

Martijn Rijkeboer mrr at sru-systems.com
Tue Apr 5 14:30:31 UTC 2016


> 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




More information about the Haskell-Cafe mailing list