[commit: ghc] master: Improve the desugaring of RULES, esp those from SPECIALISE pragmas (d4d4bef)
git at git.haskell.org
git at git.haskell.org
Fri Aug 1 13:57:51 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/d4d4bef2a2a3b90e6c5cb3544e1c2057920ed572/ghc
>---------------------------------------------------------------
commit d4d4bef2a2a3b90e6c5cb3544e1c2057920ed572
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Fri Aug 1 14:56:53 2014 +0100
Improve the desugaring of RULES, esp those from SPECIALISE pragmas
In the code for Trac #8331 we were not getting a complaint, but
we *were* getting a terrible (and virtually useless) RULE, looking
like
useAbstractMonad (complicated-dictionary-expresion) = $fuseAbstractMonad
where we wanted
useAbstractMonad d = $fuseAbstractMonad
This commit improves the desugaring algorithm. More comments
explain; see Note [Drop dictionary bindings on rule LHS]
>---------------------------------------------------------------
d4d4bef2a2a3b90e6c5cb3544e1c2057920ed572
compiler/deSugar/DsBinds.lhs | 75 ++++++++++++++++++----
testsuite/tests/simplCore/should_compile/T8331.hs | 59 +++++++++++++++++
.../tests/simplCore/should_compile/T8331.stderr | 9 +++
testsuite/tests/simplCore/should_compile/all.T | 1 +
4 files changed, 133 insertions(+), 11 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 d4d4bef2a2a3b90e6c5cb3544e1c2057920ed572
More information about the ghc-commits
mailing list