-ddump-types vs -fprint-explicit-foralls, and symbol-ness of worker/wrapper names [Re: [commit: ghc] master: Pretty-print the following TyThings via their IfaceDecl counterpart: * AnId * ACoAxiom * AConLike (065c35a) (fwd)]
Dr. ERDI Gergo
gergo at erdi.hu
Mon Mar 17 12:22:04 UTC 2014
I've just realized the original subject of this mail probably didn't
properly highlight that this unearthed two issues that I'd like to hear
opinions on, before going on to fix them. So here's my original mail:
---------- Forwarded message ----------
Date: Sun, 16 Mar 2014 00:50:19 +0800 (SGT)
From: Dr. ERDI Gergo <gergo at erdi.hu>
To: Joachim Breitner <mail at joachim-breitner.de>
Cc: GHC Devs <ghc-devs at haskell.org>
Subject: Re: [commit: ghc] master: Pretty-print the following TyThings via their
IfaceDecl counterpart: * AnId * ACoAxiom * AConLike (065c35a)
On Sat, 15 Mar 2014, Joachim Breitner wrote:
>
> Unexpected failures:
> indexed-types/should_compile T3017 [stderr mismatch] (normal)
> roles/should_compile Roles1 [stderr mismatch] (normal)
> roles/should_compile Roles2 [stderr mismatch] (normal)
> simplCore/should_compile T4306 [bad exit code] (normal)
> th T8884 [stderr mismatch] (normal)
> typecheck/should_compile tc231 [stderr mismatch] (normal)
> https://s3.amazonaws.com/archive.travis-ci.org/jobs/20819762/log.txt
> Are these related to your changes, and are pending fixing? (If not it
> might take too long until we notice, and it will be more difficult to
> find the cause.)
Hi,
Yes, these are related. However, they all point to just a change in the output
format of -ddump-types so that by default, foralls are not printed. The old
output format can be restored by passing in an extra -fprint-explicit-foralls
flag. I think this is actually an improvement, and thus my suggestion is to
simply update the expected output of these tests.
The one interesting case is T4306 which fails because the generated name $wupd
is regarded as an infix name, and thus with my new code is rendered as
($wupd) :: GHC.Prim.Double# -> GHC.Prim.Double#
instead of the old
$wupd :: GHC.Prim.Double# -> GHC.Prim.Double#
I think this is actually a bug in isSymOcc, since I don't think the intention
behind the generated name $wupd is to be regarded as an infix name. So we could
change isLexVarSym so that if the first character is $, the rest is still
checked for symbol-ness.
If there's agreement on this, I'm happy to implement both changes.
Bye,
Gergo
More information about the ghc-devs
mailing list