[commit: ghc] master: Add a pattern-syn form of PromotionErr (c069be8)

git at git.haskell.org git at git.haskell.org
Wed Dec 23 07:46:14 UTC 2015


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

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

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

commit c069be815aa0bce2eb2c9621a36f114badda2318
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Mon Dec 21 14:18:32 2015 +0000

    Add a pattern-syn form of PromotionErr
    
    The main change is to add PatSynPE to PromotionErr, so that
    when we get an ill-staged use of a pattern synonym we get a
    civilised error message.
    
    We were already doing this in half-baked form in tcValBinds, but
    this patch tidies up the impl (which previously used a hack rather
    than APromotionErr), and does it in tcTyClsInstDecls too.


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

c069be815aa0bce2eb2c9621a36f114badda2318
 compiler/hsSyn/HsBinds.hs                         |  15 ----
 compiler/typecheck/TcBinds.hs                     |  53 +++--------
 compiler/typecheck/TcEnv.hs                       | 103 +++++++++++++++++++++-
 compiler/typecheck/TcHsType.hs                    |   1 +
 compiler/typecheck/TcRnDriver.hs                  |  80 ++++++-----------
 compiler/typecheck/TcRnTypes.hs                   |   5 ++
 testsuite/tests/patsyn/should_fail/T11265.hs      |   6 ++
 testsuite/tests/patsyn/should_fail/T11265.stderr  |   6 ++
 testsuite/tests/patsyn/should_fail/T9161-1.stderr |   7 +-
 testsuite/tests/patsyn/should_fail/T9161-2.stderr |   3 +-
 testsuite/tests/patsyn/should_fail/all.T          |   1 +
 11 files changed, 163 insertions(+), 117 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 c069be815aa0bce2eb2c9621a36f114badda2318


More information about the ghc-commits mailing list