[commit: ghc] master: A raft of small changes associated with -XConstrainedClassMethods (f66e0e6)

git at git.haskell.org git at git.haskell.org
Wed Mar 4 11:58:18 UTC 2015


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

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

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

commit f66e0e695b0377c469fbe877d4850fc0ebca2010
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Wed Mar 4 11:59:47 2015 +0000

    A raft of small changes associated with -XConstrainedClassMethods
    
    See Trac #7854.  Specifically:
    
    * Major clean up and simplification of check_op in checkValidClass;
      specifically
         - use checkValidType on the entire method-selector type to detect
           ambiguity
         - put a specific test for -XConstrainedClassMethods
    
    * Make -XConstrainedClassMethods be implied by -XMultiParamTypeClasses
      (a bit ad-hoc but see #7854), and document in the user manual.
    
    * Do the checkAmbiguity test just once in TcValidity.checkValidType,
      rather than repeatedly at every level. See Note [When to call checkAmbiguity]
    
    * Add -XAllowAmbiguousTypes in GHC.IP, since 'ip' really is ambiguous.
      (It's a rather magic function.)
    
    * Improve location info for check_op in checkValidClass
    
    * Update quite a few tests, which had genuinely-ambiguous class
      method signatures.  Some I fixed by making them unambiguous; some
      by adding -XAllowAmbiguousTypes


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

f66e0e695b0377c469fbe877d4850fc0ebca2010
 compiler/main/DynFlags.hs                          |   1 +
 compiler/typecheck/TcTyClsDecls.hs                 |  75 ++++---
 compiler/typecheck/TcValidity.hs                   | 219 +++++++++++----------
 docs/users_guide/glasgow_exts.xml                  |  11 +-
 libraries/base/GHC/IP.hs                           |   2 +
 .../tests/indexed-types/should_compile/T2715.hs    |   7 +-
 .../tests/indexed-types/should_compile/T4160.hs    |   3 +
 .../tests/indexed-types/should_compile/T4200.hs    |   4 +-
 .../tests/indexed-types/should_compile/T9582.hs    |   6 +-
 .../tests/indexed-types/should_fail/T1900.stderr   |  15 +-
 testsuite/tests/indexed-types/should_fail/T2544.hs |   2 +
 .../tests/indexed-types/should_fail/T2544.stderr   |   4 +-
 testsuite/tests/module/all.T                       |   2 +-
 testsuite/tests/module/mod39.stderr                |   7 +
 testsuite/tests/polykinds/T8566.hs                 |   1 +
 testsuite/tests/polykinds/T8566.stderr             |   8 +-
 testsuite/tests/polykinds/T9200.hs                 |   3 +-
 testsuite/tests/roles/should_compile/Roles3.hs     |   1 +
 testsuite/tests/th/TH_tf2.hs                       |   1 +
 testsuite/tests/typecheck/should_compile/tc165.hs  |   1 +
 testsuite/tests/typecheck/should_compile/tc199.hs  |   3 +-
 testsuite/tests/typecheck/should_compile/tc200.hs  |   1 +
 testsuite/tests/typecheck/should_compile/tc235.hs  |   2 +
 testsuite/tests/typecheck/should_compile/tc259.hs  |   3 +
 testsuite/tests/typecheck/should_compile/tc260.hs  |   3 +
 testsuite/tests/typecheck/should_fail/all.T        |   2 +-
 .../tests/typecheck/should_fail/tcfail116.stderr   |  14 +-
 testsuite/tests/typecheck/should_fail/tcfail149.hs |   2 +
 .../tests/typecheck/should_fail/tcfail150.stderr   |   8 +
 testsuite/tests/typecheck/should_fail/tcfail151.hs |   2 +-
 30 files changed, 238 insertions(+), 175 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 f66e0e695b0377c469fbe877d4850fc0ebca2010


More information about the ghc-commits mailing list