[commit: ghc] ghc-7.10: Deal with phantom type variables in rules (bdc464f)
git at git.haskell.org
git at git.haskell.org
Thu Oct 22 15:07:12 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-7.10
Link : http://ghc.haskell.org/trac/ghc/changeset/bdc464f98d5dbe6fc85cc8dc5e769758ca2796a7/ghc
>---------------------------------------------------------------
commit bdc464f98d5dbe6fc85cc8dc5e769758ca2796a7
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Wed Jul 29 16:06:29 2015 +0100
Deal with phantom type variables in rules
See Note [Unbound template type variables] in Rules.hs
This fixes Trac #10689.
The problem was a rule LHS that mentioned a type variable
in a phantom argument to a type synonym. Then matching the
LHS didn't bind the type variable, and the rule matcher
complained.
This patch fixes the problem, as described by the Note.
I also went back to not-cloning the template varaibles during
rule matching. I'm convinced that it's not necessary now
(if it ever was), and cloning makes the fix for #10689 much more
fiddly.
>---------------------------------------------------------------
bdc464f98d5dbe6fc85cc8dc5e769758ca2796a7
compiler/specialise/Rules.hs | 120 +++++++++++++--------
testsuite/tests/simplCore/should_compile/T10689.hs | 11 ++
.../tests/simplCore/should_compile/T10689a.hs | 114 ++++++++++++++++++++
testsuite/tests/simplCore/should_compile/all.T | 2 +
4 files changed, 205 insertions(+), 42 deletions(-)
Diff suppressed because of size. To see it, use:
git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc bdc464f98d5dbe6fc85cc8dc5e769758ca2796a7
More information about the ghc-commits
mailing list