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]
Showing
- compiler/deSugar/DsBinds.lhs 64 additions, 11 deletionscompiler/deSugar/DsBinds.lhs
- testsuite/tests/simplCore/should_compile/T8331.hs 59 additions, 0 deletionstestsuite/tests/simplCore/should_compile/T8331.hs
- testsuite/tests/simplCore/should_compile/T8331.stderr 9 additions, 0 deletionstestsuite/tests/simplCore/should_compile/T8331.stderr
- testsuite/tests/simplCore/should_compile/all.T 1 addition, 0 deletionstestsuite/tests/simplCore/should_compile/all.T
Loading
Please register or sign in to comment