[commit: ghc] ghc-8.2: Handle type-lets better (c7d8099)
git at git.haskell.org
git at git.haskell.org
Tue May 23 23:47:36 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-8.2
Link : http://ghc.haskell.org/trac/ghc/changeset/c7d809928d87a7a54bcea6badea3e7ee5f7181db/ghc
>---------------------------------------------------------------
commit c7d809928d87a7a54bcea6badea3e7ee5f7181db
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.
(cherry picked from commit d6461f9684f6f758320a5e5afbf0634fcc2996a5)
>---------------------------------------------------------------
c7d809928d87a7a54bcea6badea3e7ee5f7181db
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 c7d809928d87a7a54bcea6badea3e7ee5f7181db
More information about the ghc-commits
mailing list