Open tim2CF opened 2 years ago
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
:memo: Please visit https://cla.developers.google.com/ to sign.
Once you've signed (or fixed any issues), please reply here with @googlebot I signed it!
and we'll verify it.
ℹ️ Googlers: Go here for more info.
This is quite small pull request, maybe I could receive some human feedback before google-cla bot approval. If changes could be merged in principle (maybe after some improvements) - then I'll sign cla. Otherwise it does not make much sense.
Thanks for the PR. It looks like a useful capability. I pointed out some areas for improvement. In addition to those, please add a test covering this newly added functionality.
The main feature of this PR is support of additional class instances for all generated types. Parameters for additional class deriving could be passed through
protoc
command-line argument. Example which enables stock deriving ofGHC.Generics.Generic
class for all generated haskell types:Data.ProtoLens.Compiler.Parameter
module which enables usage of cliparameter
fromplugin.proto
.Data.ProtoLens.Compiler.Parameter
to enable additional stock deriving (useful for classes likeGHC.Generics.Generic
).Data.ProtoLens.Compiler.Parameter
to enable additional default instances implementations (useful for classes which do support default implementations throughGHC.Generics.Generic
).