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

DatatypeContexts is deprecated #11

Closed
meimisaki opened this issue Sep 2, 2015 · 1 comment
Closed

DatatypeContexts is deprecated #11

meimisaki opened this issue Sep 2, 2015 · 1 comment

Comments

@meimisaki
Copy link
Contributor

I find that DatatypeContexts appear several times in this project.
(i.e. Point2/3, Vector2/3 and MergeableRecord)

According to this proposal: https://ghc.haskell.org/trac/haskell-prime/wiki/NoDatatypeContexts
DatatypeContexts is deprecated.
It was widely considered a misfeature, and has been removed from the Haskell language.
Although cabal-install makes Yampa buildable even in the latest GHC(by turning the flag on automatically).

Instead, we should use ExistentialQuantification(or GADTs) to add constraints on constructors.
For typeclass deriving, we could enable the StandaloneDeriving for convenience.

Well, actually I'm not sure if DatatypeContexts was necessary in this case.
I'll apologize if I misunderstood the usage here.

@ivanperez-keera
Copy link
Owner

Hi meimisaki

I agree.

In the future, Point2/3, Vector 2/3 and MergeableRecord should be removed from Yampa completely and other libraries used instead.

Would you be kind enough to change it by removing the datatype contexts wherever possible and send me a pull request?

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

No branches or pull requests

2 participants