legacy-old-hercules
legacy-old-hercules copied to clipboard
Split code that's not generated in Hercules.Database
For example:
instance ElmType Project where
Or check if upstream provides a way to add extra instances for each type.
@expipiplus1 do you think we could use something like https://github.com/ndmitchell/derive to separate deriving things?
I think all that we need to derive can be done with template Haskell or ghc-mod at the moment. Was their anything you had in mind?
Yes, deriving Generic, ToJSON and others could be done with template Haskell. I'm not sure what other changes we did, but we can diff :)
Oh, do you mean the deriving in the generated Database files?
On Tue, 3 Jan 2017 at 18:17 Domen Kožar [email protected] wrote:
Yes, deriving Generic, ToJSON and others could be done with template Haskell. I'm not sure what other changes we did, but we can diff :)
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/hercules-ci/hercules/issues/1#issuecomment-270183151, or mute the thread https://github.com/notifications/unsubscribe-auth/AA0U3B1f4UO4Nw0wgocZRJVp18oRudZfks5rOpCzgaJpZM4KufeF .
Yes, since opaleye-gen does add Generic instances, we'd have to derive them in separate file. Seems like https://github.com/ndmitchell/derive can do that for use using TH.
the documentation for opaleye-gen recommends using it as a starting point for further modification, and not as a tool to be run on every db update. Just putting that here, we don't have to do it that way.