[commit: ghc] master: Refactor occurrence-check logic (9417e57)

git at git.haskell.org git at git.haskell.org
Fri Oct 21 16:16:41 UTC 2016


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

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

>---------------------------------------------------------------

commit 9417e57983dbcf7f500cca16163b11d1abb699e6
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Sun Sep 25 03:50:13 2016 +0100

    Refactor occurrence-check logic
    
    This patch does two related things
    
    * Combines the occurrence-check logic in the on-the-fly unifier with
      that in the constraint solver.  They are both doing the same job,
      after all.  The resulting code is now in TcUnify:
         metaTyVarUpdateOK
         occCheckExpand
         occCheckForErrors (called in TcErrors)
    
    * In doing this I disovered checking for family-free-ness and foralls
      can be unnecessarily inefficient, because it expands type synonyms.
      It's easy just to cache this info in the type syononym TyCon, which
      I am now doing.


>---------------------------------------------------------------

9417e57983dbcf7f500cca16163b11d1abb699e6
 compiler/basicTypes/DataCon.hs           |  10 +-
 compiler/iface/TcIface.hs                |   2 +-
 compiler/prelude/TysPrim.hs              |   2 +
 compiler/prelude/TysWiredIn.hs           |   6 +-
 compiler/typecheck/TcCanonical.hs        |  10 +-
 compiler/typecheck/TcErrors.hs           |   7 +-
 compiler/typecheck/TcFlatten.hs          |  49 +++---
 compiler/typecheck/TcTyClsDecls.hs       |   2 +-
 compiler/typecheck/TcType.hs             | 281 +------------------------------
 compiler/typecheck/TcUnify.hs            |  78 +--------
 compiler/types/TyCon.hs                  |  27 ++-
 compiler/types/Type.hs                   |  25 ++-
 compiler/vectorise/Vectorise/Type/Env.hs |   2 +-
 13 files changed, 102 insertions(+), 399 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 9417e57983dbcf7f500cca16163b11d1abb699e6


More information about the ghc-commits mailing list