[commit: ghc] master: Refactor TcExpr.tcSeq (aab3c6d)

git at git.haskell.org git at git.haskell.org
Tue Jun 12 16:43:27 UTC 2018

Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/aab3c6d18416b3bc8e1378dfc4d485a9307ca5c7/ghc


commit aab3c6d18416b3bc8e1378dfc4d485a9307ca5c7
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Tue Jun 12 17:36:44 2018 +0100

    Refactor TcExpr.tcSeq
    The function TcExpr.tcSeq seemed much longer that is really
    justifiable; and was set to get worse with the fix to Trac #15242.
    This patch refactors the special cases for function applications,
    so that the special case for 'seq' can use the regular tcFunApp,
    which makes the code both clearer and shorter.  And smooths the
    way for #15242.
    The special case for 'tagToEnum#' is even more weird and ad-hoc,
    so I refrained from meddling iwth it for now.
    I also combined HsUtils.mkHsAppType and mkHsAppTypeOut, so that
    I could have a single 'wrapHsArgs' function, thereby fixing a
    ToDo from Alan Zimmerman.  That means tha tmkHsAppType now has
    an equality predicate, but I guess that's fair enough.


 compiler/hsSyn/HsUtils.hs                   |   9 +--
 compiler/typecheck/TcExpr.hs                | 117 +++++++++++++---------------
 testsuite/tests/ghci/scripts/Defer02.stderr |   4 +-
 3 files changed, 57 insertions(+), 73 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 aab3c6d18416b3bc8e1378dfc4d485a9307ca5c7

More information about the ghc-commits mailing list