proto-lens-combinators 0.1.0.8 → 0.1.0.9
raw patch · 4 files changed
+65/−351 lines, 4 filesdep ~proto-lensdep ~proto-lens-protoc
Dependency ranges changed: proto-lens, proto-lens-protoc
Files
- Changelog.md +4/−1
- dist/build/autogen/Proto/Combinators.hs +0/−309
- proto-lens-combinators.cabal +60/−41
- tests/combinators_test.hs +1/−0
Changelog.md view
@@ -1,6 +1,9 @@ # Changelog for `proto-lens-combinators` -## Unreleased changes+## v0.1.0.9+- Track proto-lens change: separate types into their own module. (#100)+- Remove support for `ghc-7.10`. (#136)+- Use a `.cabal` file that's auto-generated from `hpack`. (#138) ## 0.1.0.8 - Bump the dependency on `base` to support `ghc-8.2.1`.
− dist/build/autogen/Proto/Combinators.hs
@@ -1,309 +0,0 @@-{- This file was auto-generated from combinators.proto by the proto-lens-protoc program. -}-{-# LANGUAGE ScopedTypeVariables, DataKinds, TypeFamilies,- UndecidableInstances, MultiParamTypeClasses, FlexibleContexts,- FlexibleInstances, PatternSynonyms, MagicHash, NoImplicitPrelude- #-}-{-# OPTIONS_GHC -fno-warn-unused-imports#-}-module Proto.Combinators where-import qualified Data.ProtoLens.Reexport.Prelude as Prelude-import qualified Data.ProtoLens.Reexport.Data.Int as Data.Int-import qualified Data.ProtoLens.Reexport.Data.Word as Data.Word-import qualified Data.ProtoLens.Reexport.Data.ProtoLens- as Data.ProtoLens-import qualified- Data.ProtoLens.Reexport.Data.ProtoLens.Message.Enum- as Data.ProtoLens.Message.Enum-import qualified Data.ProtoLens.Reexport.Lens.Family2- as Lens.Family2-import qualified Data.ProtoLens.Reexport.Lens.Family2.Unchecked- as Lens.Family2.Unchecked-import qualified Data.ProtoLens.Reexport.Data.Default.Class- as Data.Default.Class-import qualified Data.ProtoLens.Reexport.Data.Text as Data.Text-import qualified Data.ProtoLens.Reexport.Data.Map as Data.Map-import qualified Data.ProtoLens.Reexport.Data.ByteString- as Data.ByteString-import qualified Data.ProtoLens.Reexport.Lens.Labels as Lens.Labels--data Foo = Foo{_Foo'quux :: !(Prelude.Maybe Data.Int.Int32),- _Foo'foo :: !(Prelude.Maybe Foo'Bar),- _Foo'bar :: !(Prelude.Maybe Foo'Bar),- _Foo'baz :: !(Prelude.Maybe Foo'Bar)}- deriving (Prelude.Show, Prelude.Eq, Prelude.Ord)--instance (a ~ Data.Int.Int32, b ~ Data.Int.Int32,- Prelude.Functor f) =>- Lens.Labels.HasLens "quux" f Foo Foo a b- where- lensOf _- = (Prelude..)- (Lens.Family2.Unchecked.lens _Foo'quux- (\ x__ y__ -> x__{_Foo'quux = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)--instance (a ~ Prelude.Maybe Data.Int.Int32,- b ~ Prelude.Maybe Data.Int.Int32, Prelude.Functor f) =>- Lens.Labels.HasLens "maybe'quux" f Foo Foo a b- where- lensOf _- = (Prelude..)- (Lens.Family2.Unchecked.lens _Foo'quux- (\ x__ y__ -> x__{_Foo'quux = y__}))- Prelude.id--instance (a ~ Foo'Bar, b ~ Foo'Bar, Prelude.Functor f) =>- Lens.Labels.HasLens "foo" f Foo Foo a b- where- lensOf _- = (Prelude..)- (Lens.Family2.Unchecked.lens _Foo'foo- (\ x__ y__ -> x__{_Foo'foo = y__}))- (Data.ProtoLens.maybeLens Data.Default.Class.def)--instance (a ~ Prelude.Maybe Foo'Bar, b ~ Prelude.Maybe Foo'Bar,- Prelude.Functor f) =>- Lens.Labels.HasLens "maybe'foo" f Foo Foo a b- where- lensOf _- = (Prelude..)- (Lens.Family2.Unchecked.lens _Foo'foo- (\ x__ y__ -> x__{_Foo'foo = y__}))- Prelude.id--instance (a ~ Foo'Bar, b ~ Foo'Bar, Prelude.Functor f) =>- Lens.Labels.HasLens "bar" f Foo Foo a b- where- lensOf _- = (Prelude..)- (Lens.Family2.Unchecked.lens _Foo'bar- (\ x__ y__ -> x__{_Foo'bar = y__}))- (Data.ProtoLens.maybeLens Data.Default.Class.def)--instance (a ~ Prelude.Maybe Foo'Bar, b ~ Prelude.Maybe Foo'Bar,- Prelude.Functor f) =>- Lens.Labels.HasLens "maybe'bar" f Foo Foo a b- where- lensOf _- = (Prelude..)- (Lens.Family2.Unchecked.lens _Foo'bar- (\ x__ y__ -> x__{_Foo'bar = y__}))- Prelude.id--instance (a ~ Foo'Bar, b ~ Foo'Bar, Prelude.Functor f) =>- Lens.Labels.HasLens "baz" f Foo Foo a b- where- lensOf _- = (Prelude..)- (Lens.Family2.Unchecked.lens _Foo'baz- (\ x__ y__ -> x__{_Foo'baz = y__}))- (Data.ProtoLens.maybeLens Data.Default.Class.def)--instance (a ~ Prelude.Maybe Foo'Bar, b ~ Prelude.Maybe Foo'Bar,- Prelude.Functor f) =>- Lens.Labels.HasLens "maybe'baz" f Foo Foo a b- where- lensOf _- = (Prelude..)- (Lens.Family2.Unchecked.lens _Foo'baz- (\ x__ y__ -> x__{_Foo'baz = y__}))- Prelude.id--instance Data.Default.Class.Default Foo where- def- = Foo{_Foo'quux = Prelude.Nothing, _Foo'foo = Prelude.Nothing,- _Foo'bar = Prelude.Nothing, _Foo'baz = Prelude.Nothing}--instance Data.ProtoLens.Message Foo where- descriptor- = let quux__field_descriptor- = Data.ProtoLens.FieldDescriptor "quux"- (Data.ProtoLens.Int32Field ::- Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)- (Data.ProtoLens.OptionalField maybe'quux)- :: Data.ProtoLens.FieldDescriptor Foo- foo__field_descriptor- = Data.ProtoLens.FieldDescriptor "foo"- (Data.ProtoLens.MessageField ::- Data.ProtoLens.FieldTypeDescriptor Foo'Bar)- (Data.ProtoLens.OptionalField maybe'foo)- :: Data.ProtoLens.FieldDescriptor Foo- bar__field_descriptor- = Data.ProtoLens.FieldDescriptor "bar"- (Data.ProtoLens.MessageField ::- Data.ProtoLens.FieldTypeDescriptor Foo'Bar)- (Data.ProtoLens.OptionalField maybe'bar)- :: Data.ProtoLens.FieldDescriptor Foo- baz__field_descriptor- = Data.ProtoLens.FieldDescriptor "baz"- (Data.ProtoLens.MessageField ::- Data.ProtoLens.FieldTypeDescriptor Foo'Bar)- (Data.ProtoLens.OptionalField maybe'baz)- :: Data.ProtoLens.FieldDescriptor Foo- in- Data.ProtoLens.MessageDescriptor (Data.Text.pack "combinators.Foo")- (Data.Map.fromList- [(Data.ProtoLens.Tag 1, quux__field_descriptor),- (Data.ProtoLens.Tag 2, foo__field_descriptor),- (Data.ProtoLens.Tag 3, bar__field_descriptor),- (Data.ProtoLens.Tag 4, baz__field_descriptor)])- (Data.Map.fromList- [("quux", quux__field_descriptor), ("foo", foo__field_descriptor),- ("bar", bar__field_descriptor), ("baz", baz__field_descriptor)])--data Foo'Bar = Foo'Bar{_Foo'Bar'fizz ::- !(Prelude.Maybe Data.Int.Int32),- _Foo'Bar'buzz :: !(Prelude.Maybe Data.Text.Text)}- deriving (Prelude.Show, Prelude.Eq, Prelude.Ord)--instance (a ~ Data.Int.Int32, b ~ Data.Int.Int32,- Prelude.Functor f) =>- Lens.Labels.HasLens "fizz" f Foo'Bar Foo'Bar a b- where- lensOf _- = (Prelude..)- (Lens.Family2.Unchecked.lens _Foo'Bar'fizz- (\ x__ y__ -> x__{_Foo'Bar'fizz = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)--instance (a ~ Prelude.Maybe Data.Int.Int32,- b ~ Prelude.Maybe Data.Int.Int32, Prelude.Functor f) =>- Lens.Labels.HasLens "maybe'fizz" f Foo'Bar Foo'Bar a b- where- lensOf _- = (Prelude..)- (Lens.Family2.Unchecked.lens _Foo'Bar'fizz- (\ x__ y__ -> x__{_Foo'Bar'fizz = y__}))- Prelude.id--instance (a ~ Data.Text.Text, b ~ Data.Text.Text,- Prelude.Functor f) =>- Lens.Labels.HasLens "buzz" f Foo'Bar Foo'Bar a b- where- lensOf _- = (Prelude..)- (Lens.Family2.Unchecked.lens _Foo'Bar'buzz- (\ x__ y__ -> x__{_Foo'Bar'buzz = y__}))- (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)--instance (a ~ Prelude.Maybe Data.Text.Text,- b ~ Prelude.Maybe Data.Text.Text, Prelude.Functor f) =>- Lens.Labels.HasLens "maybe'buzz" f Foo'Bar Foo'Bar a b- where- lensOf _- = (Prelude..)- (Lens.Family2.Unchecked.lens _Foo'Bar'buzz- (\ x__ y__ -> x__{_Foo'Bar'buzz = y__}))- Prelude.id--instance Data.Default.Class.Default Foo'Bar where- def- = Foo'Bar{_Foo'Bar'fizz = Prelude.Nothing,- _Foo'Bar'buzz = Prelude.Nothing}--instance Data.ProtoLens.Message Foo'Bar where- descriptor- = let fizz__field_descriptor- = Data.ProtoLens.FieldDescriptor "fizz"- (Data.ProtoLens.Int32Field ::- Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)- (Data.ProtoLens.OptionalField maybe'fizz)- :: Data.ProtoLens.FieldDescriptor Foo'Bar- buzz__field_descriptor- = Data.ProtoLens.FieldDescriptor "buzz"- (Data.ProtoLens.StringField ::- Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)- (Data.ProtoLens.OptionalField maybe'buzz)- :: Data.ProtoLens.FieldDescriptor Foo'Bar- in- Data.ProtoLens.MessageDescriptor- (Data.Text.pack "combinators.Foo.Bar")- (Data.Map.fromList- [(Data.ProtoLens.Tag 1, fizz__field_descriptor),- (Data.ProtoLens.Tag 2, buzz__field_descriptor)])- (Data.Map.fromList- [("fizz", fizz__field_descriptor),- ("buzz", buzz__field_descriptor)])--bar ::- forall f s t a b . (Lens.Labels.HasLens "bar" f s t a b) =>- Lens.Family2.LensLike f s t a b-bar- = Lens.Labels.lensOf- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "bar")--baz ::- forall f s t a b . (Lens.Labels.HasLens "baz" f s t a b) =>- Lens.Family2.LensLike f s t a b-baz- = Lens.Labels.lensOf- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "baz")--buzz ::- forall f s t a b . (Lens.Labels.HasLens "buzz" f s t a b) =>- Lens.Family2.LensLike f s t a b-buzz- = Lens.Labels.lensOf- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "buzz")--fizz ::- forall f s t a b . (Lens.Labels.HasLens "fizz" f s t a b) =>- Lens.Family2.LensLike f s t a b-fizz- = Lens.Labels.lensOf- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "fizz")--foo ::- forall f s t a b . (Lens.Labels.HasLens "foo" f s t a b) =>- Lens.Family2.LensLike f s t a b-foo- = Lens.Labels.lensOf- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "foo")--maybe'bar ::- forall f s t a b . (Lens.Labels.HasLens "maybe'bar" f s t a b) =>- Lens.Family2.LensLike f s t a b-maybe'bar- = Lens.Labels.lensOf- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'bar")--maybe'baz ::- forall f s t a b . (Lens.Labels.HasLens "maybe'baz" f s t a b) =>- Lens.Family2.LensLike f s t a b-maybe'baz- = Lens.Labels.lensOf- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'baz")--maybe'buzz ::- forall f s t a b . (Lens.Labels.HasLens "maybe'buzz" f s t a b) =>- Lens.Family2.LensLike f s t a b-maybe'buzz- = Lens.Labels.lensOf- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'buzz")--maybe'fizz ::- forall f s t a b . (Lens.Labels.HasLens "maybe'fizz" f s t a b) =>- Lens.Family2.LensLike f s t a b-maybe'fizz- = Lens.Labels.lensOf- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'fizz")--maybe'foo ::- forall f s t a b . (Lens.Labels.HasLens "maybe'foo" f s t a b) =>- Lens.Family2.LensLike f s t a b-maybe'foo- = Lens.Labels.lensOf- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'foo")--maybe'quux ::- forall f s t a b . (Lens.Labels.HasLens "maybe'quux" f s t a b) =>- Lens.Family2.LensLike f s t a b-maybe'quux- = Lens.Labels.lensOf- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'quux")--quux ::- forall f s t a b . (Lens.Labels.HasLens "quux" f s t a b) =>- Lens.Family2.LensLike f s t a b-quux- = Lens.Labels.lensOf- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "quux")
proto-lens-combinators.cabal view
@@ -1,50 +1,69 @@-name: proto-lens-combinators-version: 0.1.0.8-synopsis: Utilities functions to proto-lens.-description:- Useful things for working with protos.+-- This file has been generated from package.yaml by hpack version 0.20.0.+--+-- see: https://github.com/sol/hpack+--+-- hash: e13602bc73aef7729ccbfbafa950e439013500430b79b23780690aa40613a998 -homepage: https://github.com/google/proto-lens-license: BSD3-license-file: LICENSE-author: Zie Weaver-maintainer: zearen+protolens@google.com-copyright: Google Inc.-category: Data-build-type: Custom-cabal-version: >=1.10-extra-source-files: tests/combinators.proto-extra-source-files: Changelog.md+name: proto-lens-combinators+version: 0.1.0.9+synopsis: Utilities functions to proto-lens.+description: Useful things for working with protos.+category: Data+homepage: https://github.com/google/proto-lens#readme+bug-reports: https://github.com/google/proto-lens/issues+author: Zie Weaver+maintainer: zearen+protolens@google.com+copyright: Google Inc.+license: BSD3+license-file: LICENSE+build-type: Custom+cabal-version: >= 1.10 +extra-source-files:+ Changelog.md+ tests/combinators.proto++source-repository head+ type: git+ location: https://github.com/google/proto-lens+ subdir: proto-lens-combinators+ custom-setup- setup-depends: base >= 4.8 && < 4.11- , Cabal- , proto-lens-protoc == 0.2.*+ setup-depends:+ Cabal+ , base >=4.8 && <4.11+ , proto-lens-protoc ==0.3.* library+ hs-source-dirs:+ src+ build-depends:+ base >=4.8 && <4.11+ , data-default-class >=0.0 && <0.2+ , lens-family ==1.2.*+ , proto-lens-protoc ==0.3.*+ , transformers >=0.4 && <0.6+ exposed-modules:+ Data.ProtoLens.Combinators+ other-modules:+ Paths_proto_lens_combinators default-language: Haskell2010- hs-source-dirs: src- exposed-modules: Data.ProtoLens.Combinators- build-depends: proto-lens >= 0.1 && < 0.3- -- Used by the custom Setup script (for the test-suite).- , proto-lens-protoc >= 0.1 && < 0.3- , base >= 4.8 && < 4.11- , data-default-class >= 0.0 && < 0.2- , lens-family == 1.2.*- , transformers >= 0.4 && < 0.6 -Test-Suite combinators_test- default-language: Haskell2010+test-suite combinators_test type: exitcode-stdio-1.0 main-is: combinators_test.hs- hs-source-dirs: tests- other-modules: Proto.Combinators- build-depends: HUnit- , base- , lens-family- , lens-family-core- , proto-lens- , proto-lens-combinators- , proto-lens-protoc- , test-framework- , test-framework-hunit+ hs-source-dirs:+ tests+ build-depends:+ HUnit+ , base+ , lens-family+ , lens-family-core+ , proto-lens+ , proto-lens-combinators+ , proto-lens-protoc+ , test-framework+ , test-framework-hunit+ other-modules:+ Paths_proto_lens_combinators+ default-language: Haskell2010
tests/combinators_test.hs view
@@ -12,6 +12,7 @@ import Lens.Family ((^.), (.~), (&)) import Lens.Family.State ((.=), (<~), use, zoom) import Proto.Combinators+import Proto.Combinators_Fields import Test.Framework (defaultMain) import Test.Framework.Providers.HUnit (hUnitTestToTests) import Test.HUnit ((~:), (~?=))