[commit: ghc] master: SCC analysis for instances as well as types/classes (353d8ae)

git at git.haskell.org git at git.haskell.org
Wed Apr 20 13:26:25 UTC 2016


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

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

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

commit 353d8ae6fafe117a1cac4adf6f029a5baccc2780
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Wed Apr 20 12:56:40 2016 +0100

    SCC analysis for instances as well as types/classes
    
    This big patch is in pursuit of Trac #11348.
    
    It is largely the work of Alex Veith (thank you!), with some
    follow-up simplification and refactoring from Simon PJ.
    
    The main payload is described in RnSource
      Note [Dependency analysis of type, class, and instance decls]
    which is pretty detailed.
    
    * There is a new data type HsDecls.TyClGroup, for a strongly
      connected component of type/class/instance/role decls.
    
      The hs_instds field of HsGroup disappears, in consequence
    
      This forces some knock-on changes, including a minor
      haddock submodule update
    
    Smaller, weakly-related things
    
    * I found that both the renamer and typechecker were building an
      identical env for RoleAnnots, so I put common code for
      RoleAnnotEnv in RnEnv.
    
    * I found that tcInstDecls1 had very clumsy error handling, so I
      put it together into TcInstDcls.doClsInstErrorChecks


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

353d8ae6fafe117a1cac4adf6f029a5baccc2780
 compiler/deSugar/DsMeta.hs                         |   6 +-
 compiler/hsSyn/HsDecls.hs                          | 302 ++++++-----
 compiler/hsSyn/HsUtils.hs                          |  21 +-
 compiler/parser/RdrHsSyn.hs                        |   2 +-
 compiler/rename/RnEnv.hs                           |  33 ++
 compiler/rename/RnNames.hs                         |   9 +-
 compiler/rename/RnSource.hs                        | 592 ++++++++++++++-------
 compiler/typecheck/TcDeriv.hs                      |   7 +-
 compiler/typecheck/TcInstDcls.hs                   | 171 +++---
 compiler/typecheck/TcInstDcls.hs-boot              |  16 +
 compiler/typecheck/TcRnDriver.hs                   |  52 +-
 compiler/typecheck/TcTyClsDecls.hs                 | 158 ++++--
 compiler/typecheck/TcTyDecls.hs                    |  37 +-
 testsuite/tests/deriving/should_fail/T9687.stderr  |   6 +-
 testsuite/tests/driver/sigof02/Map.hsig            |   1 -
 testsuite/tests/ghci/scripts/T4175.stdout          |   2 +-
 .../tests/indexed-types/should_fail/T8550.stderr   |  21 +-
 testsuite/tests/polykinds/T8132.stderr             |   5 +-
 .../tests/rename/should_compile/T4003A.hs-boot     |   1 -
 testsuite/tests/roles/should_compile/T8958.stderr  |   2 +-
 testsuite/tests/th/T1835.stdout                    |   6 +-
 testsuite/tests/typecheck/should_compile/T11348.hs |  18 +
 testsuite/tests/typecheck/should_compile/all.T     |   1 +
 .../tests/typecheck/should_fail/T6018fail.stderr   |   6 +-
 .../tests/typecheck/should_fail/tcfail211.stderr   |  16 +-
 utils/ghctags/Main.hs                              |   3 +-
 utils/haddock                                      |   2 +-
 27 files changed, 914 insertions(+), 582 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 353d8ae6fafe117a1cac4adf6f029a5baccc2780


More information about the ghc-commits mailing list