You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Take for instance test files from test-files/ directory, if you compile them you get these Haskell modules:
TestProto
TestProtoImport
TestProtoLeadingDot
TestProtoNestedMessage
TestProtoOneof
TestProtoOneofImport
TestProtoProtocPlugin
This pollutes top-level module namespace. It would be nice to provide an argument to put the generated Haskell file under some namespace. Sometime like this:
And then all the modules would be named like this:
Data.Proto.Model.TestProto
Data.Proto.Model.TestProtoImport
Data.Proto.Model.TestProtoLeadingDot
Data.Proto.Model.TestProtoNestedMessage
Data.Proto.Model.TestProtoOneof
Data.Proto.Model.TestProtoOneofImport
Data.Proto.Model.TestProtoProtocPlugin
And this would change only Haskell module names and nothing else.
P.S. I’ve tried to implement myself but I couldn’t come up with a good solution yet. I need to get deeper into the code. Maybe you have some ideas of how this can be done?
The text was updated successfully, but these errors were encountered:
Take for instance test files from
test-files/
directory, if you compile them you get these Haskell modules:TestProto
TestProtoImport
TestProtoLeadingDot
TestProtoNestedMessage
TestProtoOneof
TestProtoOneofImport
TestProtoProtocPlugin
This pollutes top-level module namespace. It would be nice to provide an argument to put the generated Haskell file under some namespace. Sometime like this:
compile-proto-file --moduleNamespace 'Data.Proto.Model'
And then all the modules would be named like this:
Data.Proto.Model.TestProto
Data.Proto.Model.TestProtoImport
Data.Proto.Model.TestProtoLeadingDot
Data.Proto.Model.TestProtoNestedMessage
Data.Proto.Model.TestProtoOneof
Data.Proto.Model.TestProtoOneofImport
Data.Proto.Model.TestProtoProtocPlugin
And this would change only Haskell module names and nothing else.
P.S. I’ve tried to implement myself but I couldn’t come up with a good solution yet. I need to get deeper into the code. Maybe you have some ideas of how this can be done?
The text was updated successfully, but these errors were encountered: