proto-lens

A lens-based implementation of protocol buffers in Haskell.

https://github.com/google/proto-lens

Version on this page:0.2.2.0
LTS Haskell 22.14:0.7.1.4
Stackage Nightly 2023-12-26:0.7.1.4
Latest on Hackage:0.7.1.4

See all snapshots proto-lens appears in

BSD-3-Clause licensed by Judah Jacobson
Maintained by [email protected]
This version can be pinned in stack with:proto-lens-0.2.2.0@sha256:ef9e2e26aeb037032fba19fe2332b49b55f944dc1a2908d68bce48f4dc96a6c4,1680

The proto-lens library provides to protocol buffers using modern Haskell language and library patterns. Specifically, it provides:

  • Composable field accessors via lenses

  • Simple field name resolution/overloading via type-level literals

  • Type-safe reflection and encoding/decoding of messages via GADTs

Changes

Changelog for proto-lens

Unreleased changes

v0.2.2.0

  • Bump the dependency on base to support ghc-8.2.1.

v0.2.1.0

  • Include base’s modules in the reexport list.
  • Use custom-setup in packages that depend on proto-lens-protoc.
  • Allow .proto files to import between Haskell packages.
  • Add the proto-lens-protobuf-types package.

v0.2.0.1

  • Make the libraries ‘-Wall -Werror’-clean for the latest version of GHC.

v0.2.0.0

  • Support OverloadedLabels with the new lens-labels package.
  • Fix codegen for field names that are already camel-cased.
  • Increase version bounds to work with Stackage lts-8.

v0.1.0.5

  • Fix the handling of packed repeated fields (#38)
  • Improve space usage and time of decoding (#63)
  • Print fields ordered by tag number (#40)

v0.1.0.4

  • Relaxed dependency constraints on data-default-class for new stackage LTS.

v0.1.0.3

  • In printing and parsing protocol buffers use/interpret escape sequences in a way compatible with the Protocol Buffer distribution’s C/C++ escaping style, closing Issues #44 and #45. This makes the text output incompatible with previous versions; earlier versions will misinterpret text written by this version and this version will misinterpret text written by previous versions.
  • Support reading text protocol buffers with single quote characters (’) for string delimiters, closing Issue #20.

v0.1.0.2

  • Expose more of protoc-gen-haskell to plugins.
  • Support enum aliases.
  • TextFormat prints enum names instead of numbers.

v0.1.0.1

  • Support ghc-8.
  • Handle .proto files without a “package” declaration (#11).

v0.1.0.0

  • Initial version.