higherkindness / mu-haskell

Mu (μ) is a purely functional framework for building micro services.
http://higherkindness.io/mu-haskell/
Apache License 2.0
333 stars 19 forks source link

support capital letter for RPC method names #337

Closed listx closed 2 years ago

listx commented 2 years ago

The protocol buffer style guide at https://developers.google.com/protocol-buffers/docs/style#services says that RPC method names should start with a capital letter. I've noticed that if I use capital letters, at least the "optics" flavored clients don't work because #MethodName is invalid whereas #methodName is OK. I assume the other styles (records or type applications style) are fine with using capitalized method names but I would like to use the optics style because it feels simpler and appears to be the preferred style of writing clients.

serras commented 2 years ago

Unfortunately, starting with lowercase is a limitation of GHC. You can follow the suggestion from the docs and use fromLabel @"MethodName" in the meanwhile.