soenkehahn / getopt-generics

Create command line interfaces with ease
Other
41 stars 3 forks source link

Make it easier to derive an instance for `HasArguments`. #48

Closed soenkehahn closed 9 years ago

soenkehahn commented 9 years ago

This should be dead simple and very short.

soenkehahn commented 9 years ago

Currently it is very noisy to use record types with withCli (see for example here: https://github.com/soenkehahn/getopt-generics/blob/master/docs/SimpleRecord.hs), because you have to

For a library that strives for ease of use this is far too complicated. There are a few options of removing some of the noise:

Though I haven't looked into any of these in detail, so I don't know how any of them would look in practice or if they are even feasable. (Especially for the last one I would be surprised if ghc allowed to do that.)

(See also https://github.com/well-typed/generics-sop/issues/10.)

soenkehahn commented 9 years ago

Resolved by #50 using Generics.SOP.GGP. (@kosmikus, @sol)