[commit: ghc] master: Handle type-lets better (d6461f9)
git at git.haskell.org
git at git.haskell.org
Wed May 17 12:48:12 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/d6461f9684f6f758320a5e5afbf0634fcc2996a5/ghc
>---------------------------------------------------------------
commit d6461f9684f6f758320a5e5afbf0634fcc2996a5
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Wed May 17 09:44:46 2017 +0100
Handle type-lets better
Core allows non-recursive type-lets, thus
let a = TYPE ty in ...
They are substituted away very quickly, but it's convenient for
some passes to produce them (rather than to have to substitute
immediately).
Trac #13708 tried the effect of not running the simplifer at all
(a rather bizarre thing to do, but still). That showed that some
passes crashed because they always treated a let-bounder binder
as an Id. This patch adds some easy fixes.
>---------------------------------------------------------------
d6461f9684f6f758320a5e5afbf0634fcc2996a5
compiler/basicTypes/Id.hs | 6 +++--
compiler/basicTypes/Var.hs | 4 ++--
compiler/coreSyn/CoreFVs.hs | 27 ++++++++--------------
compiler/simplCore/CSE.hs | 14 +++++++----
compiler/simplCore/FloatIn.hs | 4 ++--
testsuite/tests/simplCore/should_compile/T13708.hs | 11 +++++++++
testsuite/tests/simplCore/should_compile/all.T | 1 +
7 files changed, 39 insertions(+), 28 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 d6461f9684f6f758320a5e5afbf0634fcc2996a5
More information about the ghc-commits
mailing list