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

Already on GitHub? Sign in to your account

DatatypeContexts is required by Graphics.Rendering.OpenGL.GL.Evaluators #25

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants

Adds using a LANGUAGE pragma

Owner

dagit commented Feb 4, 2012

Hello,

Could you please explain the motivation for this change?

Thanks,
Jason

With GHC 7.2.1 the DataTypeContexts extension was deprecated but was on by default. In GHC 7.4.1 the DataTypeContexts extension is now off by default. This patch re-enables the extension just for that file. Which enables the file to compile under 7.4.1. The change should have no effect on 7.2.1.
A separate patch would be to remove the use of a data type context and use GADTs.

Owner

dagit commented Feb 4, 2012

Oh, thank you very much for pointing this out. I haven't been able to
test with 7.4 yet (just built it yesterday).

I think -XDataTypeContexts was added too recently to use it. It
appears in the 7.x documentation, but I can't find it mentioned here
for 6.12-latest:
http://www.haskell.org/ghc/docs/6.12-latest/html/users_guide/release-6-12-2.html

I'd like to avoid breaking older GHCs, when possible. Which also
implies we really need some build slave infrastructure setup so that
we can tell when these sorts of things will break. We have such an
infrastructure at work, I wonder if I could piggy back on it (but then
it wouldn't be publicly visible :( GADTs are notorious for changing a
bit between releases so I'd also prefer to avoid them.

I have to think about this a bit more. For example, can we simply
remove the data type contexts in this case without changing the
semantics (typically that's the case).

Thanks,
Jason

On Sat, Feb 4, 2012 at 11:29 AM, Corey O'Connor
reply@reply.github.com
wrote:

With GHC 7.2.1 the DataTypeContexts extension was deprecated but was on by default. In GHC 7.4.1 the DataTypeContexts extension is now off by default. This patch re-enables the extension just for that file. Which enables the file to compile under 7.4.1. The change should have no effect on 7.2.1.
A separate patch would be to remove the use of a data type context and use GADTs.


Reply to this email directly or view it on GitHub:
#25 (comment)

Owner

dagit commented Feb 5, 2012

I fixed this by removing the data type context. New version is up on hackage. Thanks for reporting this issue!

@dagit dagit closed this Feb 5, 2012

Excellent! Even better than adding the extension. :-)
I believe data type contexts were deprecated because they had no real effect (Well, not the anticipated effect) So in most cases data type contexts can be removed without issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment