SpecConstr: accommodate casts in value arguments
This commit: commit fb050a33 Author: Simon Peyton Jones <simonpj@microsoft.com> Date: Thu Oct 12 11:00:19 2017 +0100 Do not bind coercion variables in SpecConstr rules arranged to reject any SpecConstr call pattern that mentioned a coercion in the pattern. There was a good reason for that -- see Note [SpecConstr and casts] -- but I didn't realise how important it was to accept patterns that mention casts in /terms/. Trac #14936 showed this up. This patch just narrows the restriction to discard only the cases where the coercion is mentioned only in types. Fortunately that was pretty easy to do. (cherry picked from commit 5ab8094e)
Showing
- compiler/specialise/SpecConstr.hs 47 additions, 9 deletionscompiler/specialise/SpecConstr.hs
- testsuite/tests/perf/should_run/T14936.hs 29 additions, 0 deletionstestsuite/tests/perf/should_run/T14936.hs
- testsuite/tests/perf/should_run/T14936.stdout 1 addition, 0 deletionstestsuite/tests/perf/should_run/T14936.stdout
- testsuite/tests/perf/should_run/all.T 6 additions, 0 deletionstestsuite/tests/perf/should_run/all.T
Loading
Please register or sign in to comment