Closed soenkehahn closed 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
DeriveGeneric
,WithCli
,GHC.Generics
,GHC.Generics.Generic
,Generics.SOP.Generic
,Generics.SOP.HasDatatypeInfo
,HasArguments
.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:
TemplateHaskell
to derive all the needed instances.GHC.Generics
, thereby removing the need to derive the sop
classes.Data.Data.Data
.HasArguments
(and just implement everything directly on Generic
).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.)
Resolved by #50 using Generics.SOP.GGP
. (@kosmikus, @sol)
This should be dead simple and very short.