[commit: ghc] ghc-7.10: Deal with phantom type variables in rules (0269d37)
git at git.haskell.org
git at git.haskell.org
Tue Sep 29 16:09:11 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-7.10
Link : http://ghc.haskell.org/trac/ghc/changeset/0269d37534eebaba2d5cd125a1ae4c60b9e89887/ghc
>---------------------------------------------------------------
commit 0269d37534eebaba2d5cd125a1ae4c60b9e89887
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.
>---------------------------------------------------------------
0269d37534eebaba2d5cd125a1ae4c60b9e89887
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 0269d37534eebaba2d5cd125a1ae4c60b9e89887
More information about the ghc-commits
mailing list