HEADS-UP: diagrams does not compile with HEAD (regressions)

Devs, as of recently GHC HEAD stopped building the diagrams library. Several prerequisite libs also fail to compile. A specific error message appears in an attoparsec issue https://github.com/bos/attoparsec/issues/67, for which I have submitted a workaround. But as Herbert cautiously points out, this could be a recent GHC bug surfacing. The symptoms of the bug seem to be that GHC complains about the usage of (~) type equality operation, but there is no reference to that type operator in the source code. To work around the problem it suffices to add -XGADTs or -XTypeFamilies. Does this ring any bells? Can automatized tests catch such things in the future? Cheers, Gabor

I expect this is a result of https://ghc.haskell.org/trac/ghc/ticket/8883,
but even so it's not clear to me whether the error is correct. It would be
nice if GHC printed the type it inferred for succ' in this kind of
situation.
Regards,
Reid Barton
On Tue, Jun 10, 2014 at 7:55 AM, Gabor Greif
Devs,
as of recently GHC HEAD stopped building the diagrams library. Several prerequisite libs also fail to compile. A specific error message appears in an attoparsec issue https://github.com/bos/attoparsec/issues/67, for which I have submitted a workaround. But as Herbert cautiously points out, this could be a recent GHC bug surfacing.
The symptoms of the bug seem to be that GHC complains about the usage of (~) type equality operation, but there is no reference to that type operator in the source code. To work around the problem it suffices to add -XGADTs or -XTypeFamilies.
Does this ring any bells? Can automatized tests catch such things in the future?
Cheers,
Gabor _______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs

Reid is correct. This is a result of fixing #8883. I agree that printing the inferred signature sounds like a good idea. Janek Dnia wtorek, 10 czerwca 2014, Reid Barton napisał:
I expect this is a result of https://ghc.haskell.org/trac/ghc/ticket/8883, but even so it's not clear to me whether the error is correct. It would be nice if GHC printed the type it inferred for succ' in this kind of situation.
Regards, Reid Barton
On Tue, Jun 10, 2014 at 7:55 AM, Gabor Greif
wrote: Devs,
as of recently GHC HEAD stopped building the diagrams library. Several prerequisite libs also fail to compile. A specific error message appears in an attoparsec issue https://github.com/bos/attoparsec/issues/67, for which I have submitted a workaround. But as Herbert cautiously points out, this could be a recent GHC bug surfacing.
The symptoms of the bug seem to be that GHC complains about the usage of (~) type equality operation, but there is no reference to that type operator in the source code. To work around the problem it suffices to add -XGADTs or -XTypeFamilies.
Does this ring any bells? Can automatized tests catch such things in the future?
Cheers,
Gabor _______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs

I'm doing that now
| -----Original Message-----
| From: ghc-devs [mailto:ghc-devs-bounces@haskell.org] On Behalf Of Jan
| Stolarek
| Sent: 10 June 2014 17:16
| To: ghc-devs@haskell.org
| Subject: Re: HEADS-UP: diagrams does not compile with HEAD (regressions)
|
| Reid is correct. This is a result of fixing #8883. I agree that printing
| the inferred signature
| sounds like a good idea.
|
| Janek
|
| Dnia wtorek, 10 czerwca 2014, Reid Barton napisał:
| > I expect this is a result of
| https://ghc.haskell.org/trac/ghc/ticket/8883,
| > but even so it's not clear to me whether the error is correct. It would
| be
| > nice if GHC printed the type it inferred for succ' in this kind of
| > situation.
| >
| > Regards,
| > Reid Barton
| >
| > On Tue, Jun 10, 2014 at 7:55 AM, Gabor Greif

Hello Jan,
thanks for clarifying this! As it is biting various libraries, it
would warrant to add some blurb into the release notes. Or does an
entry exist already?
Cheers,
Gabor
On 6/10/14, Jan Stolarek
Reid is correct. This is a result of fixing #8883. I agree that printing the inferred signature sounds like a good idea.
Janek
Dnia wtorek, 10 czerwca 2014, Reid Barton napisał:
I expect this is a result of https://ghc.haskell.org/trac/ghc/ticket/8883, but even so it's not clear to me whether the error is correct. It would be nice if GHC printed the type it inferred for succ' in this kind of situation.
Regards, Reid Barton
On Tue, Jun 10, 2014 at 7:55 AM, Gabor Greif
wrote: Devs,
as of recently GHC HEAD stopped building the diagrams library. Several prerequisite libs also fail to compile. A specific error message appears in an attoparsec issue https://github.com/bos/attoparsec/issues/67, for which I have submitted a workaround. But as Herbert cautiously points out, this could be a recent GHC bug surfacing.
The symptoms of the bug seem to be that GHC complains about the usage of (~) type equality operation, but there is no reference to that type operator in the source code. To work around the problem it suffices to add -XGADTs or -XTypeFamilies.
Does this ring any bells? Can automatized tests catch such things in the future?
Cheers,
Gabor _______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs

No, there is no mention of it in the release notes. My bad. I'm putting it on my TODO list. Janek Dnia środa, 11 czerwca 2014, Gabor Greif napisał:
Hello Jan,
thanks for clarifying this! As it is biting various libraries, it would warrant to add some blurb into the release notes. Or does an entry exist already?
Cheers,
Gabor
On 6/10/14, Jan Stolarek
wrote: Reid is correct. This is a result of fixing #8883. I agree that printing the inferred signature sounds like a good idea.
Janek
Dnia wtorek, 10 czerwca 2014, Reid Barton napisał:
I expect this is a result of https://ghc.haskell.org/trac/ghc/ticket/8883, but even so it's not clear to me whether the error is correct. It would be nice if GHC printed the type it inferred for succ' in this kind of situation.
Regards, Reid Barton
On Tue, Jun 10, 2014 at 7:55 AM, Gabor Greif
wrote: Devs,
as of recently GHC HEAD stopped building the diagrams library. Several prerequisite libs also fail to compile. A specific error message appears in an attoparsec issue https://github.com/bos/attoparsec/issues/67, for which I have submitted a workaround. But as Herbert cautiously points out, this could be a recent GHC bug surfacing.
The symptoms of the bug seem to be that GHC complains about the usage of (~) type equality operation, but there is no reference to that type operator in the source code. To work around the problem it suffices to add -XGADTs or -XTypeFamilies.
Does this ring any bells? Can automatized tests catch such things in the future?
Cheers,
Gabor _______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs

I suspect that the issue is the following: GHC is inferring a type for a function that could not be written by the user, at least not without -XTypeFamilies or -XGADTs, something like f :: (a ~ F b) => blah blah It's a good principle that if GHC infers a type, then it should be ok to put that type in manually. But that means that you need -XTypeFamilies even for the inferred type. So unless I'm misunderstanding the issue, it's not a bug but a feature. It is a change, certainly, and one that makes GHC a bit more picky. Can you update diagrams to include type signatures or -XGADTs/TypeFamilies? Thanks Simon | -----Original Message----- | From: ghc-devs [mailto:ghc-devs-bounces@haskell.org] On Behalf Of Gabor | Greif | Sent: 10 June 2014 12:55 | To: ghc-devs | Subject: HEADS-UP: diagrams does not compile with HEAD (regressions) | | Devs, | | as of recently GHC HEAD stopped building the diagrams library. Several | prerequisite libs also fail to compile. A specific error message | appears in an attoparsec issue | https://github.com/bos/attoparsec/issues/67, for which I have | submitted a workaround. But as Herbert cautiously points out, this | could be a recent GHC bug surfacing. | | The symptoms of the bug seem to be that GHC complains about the usage | of (~) type equality operation, but there is no reference to that type | operator in the source code. To work around the problem it suffices to | add -XGADTs or -XTypeFamilies. | | Does this ring any bells? Can automatized tests catch such things in the | future? | | Cheers, | | Gabor | _______________________________________________ | ghc-devs mailing list | ghc-devs@haskell.org | http://www.haskell.org/mailman/listinfo/ghc-devs
participants (4)
-
Gabor Greif
-
Jan Stolarek
-
Reid Barton
-
Simon Peyton Jones