...instead of delegating to code generated from the .proto
definitions of the standard Google protobuf wrapper types.
By avoiding delegation to wrapper implementations generated
from .proto definitions we avoid the need to generate such
implementations and link against them.
More importantly, by coercing between "Maybe Text" and
a polymorphic wrapper instead of a single fixed Haskell
representation of "StringValue", we enable a future
per-module choice between strict and lazy "Text" types,
rather than restricting ourselves to a uniform decision.
In fact, "Text" could be replaced by any string type that
provides the required type class instances for protobuf
serialization. The same could be done for "BytesValue".
Supporting changes:
0.5.1 -> 0.5.2
Expand Python compatibility tests to cover JSONPB format.
Expand Python compatibility tests to cover Google protobuf wrappers.
Fix compile error in generated code when a message field has type
BytesValue and cabal flag "swagger-wrapper-format" is False.
Support numeric enumerator codes in JSONPB, as required by the protobuf standard.
Changes we could perhaps postpone, but seem natural in this context:
With regard to how unrecognized enumerator codes are handled
in binary encoding and decoding (as opposed to JSONPB), make
packed repeated enumeration fields behave like other enumeration fields.
Replace use of "{-# SOURCE #-}" with an internal module.
...instead of delegating to code generated from the .proto definitions of the standard Google protobuf wrapper types.
By avoiding delegation to wrapper implementations generated from .proto definitions we avoid the need to generate such implementations and link against them.
More importantly, by coercing between "Maybe Text" and a polymorphic wrapper instead of a single fixed Haskell representation of "StringValue", we enable a future per-module choice between strict and lazy "Text" types, rather than restricting ourselves to a uniform decision. In fact, "Text" could be replaced by any string type that provides the required type class instances for protobuf serialization. The same could be done for "BytesValue".
Supporting changes:
Changes we could perhaps postpone, but seem natural in this context: