Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split code that's not generated in Hercules.Database #1

Open
domenkozar opened this issue Nov 10, 2016 · 6 comments
Open

Split code that's not generated in Hercules.Database #1

domenkozar opened this issue Nov 10, 2016 · 6 comments
Labels

Comments

@domenkozar
Copy link
Contributor

For example:

instance ElmType Project where

Or check if upstream provides a way to add extra instances for each type.

@domenkozar
Copy link
Contributor Author

@expipiplus1 do you think we could use something like https://github.com/ndmitchell/derive to separate deriving things?

@expipiplus1
Copy link
Contributor

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?

@domenkozar
Copy link
Contributor Author

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 :)

@expipiplus1
Copy link
Contributor

expipiplus1 commented Jan 3, 2017 via email

@domenkozar
Copy link
Contributor Author

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.

@expipiplus1
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants