[commit: ghc] master: Improve pattern synonym error messages (add `PatSynOrigin`) (116528c)

git at git.haskell.org git at git.haskell.org
Thu Feb 25 19:49:38 UTC 2016


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

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

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

commit 116528c8429257a0ae855251fd266547bb23d01d
Author: Rik Steenkamp <rik at ewps.nl>
Date:   Thu Feb 25 19:27:54 2016 +0100

    Improve pattern synonym error messages (add `PatSynOrigin`)
    
    Adds a new data constructor `PatSynOrigin Bool Name` to the `CtOrigin`
    data type. This allows for better error messages when the origin of a
    wanted constraint is a pattern synonym declaration.
    
    Fixes T10873.
    
    Reviewers: mpickering, simonpj, austin, thomie, bgamari
    
    Reviewed By: simonpj, thomie, bgamari
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D1866
    
    GHC Trac Issues: #10873


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

116528c8429257a0ae855251fd266547bb23d01d
 compiler/typecheck/TcErrors.hs                   | 37 +++++++++++++++++++-----
 compiler/typecheck/TcPatSyn.hs                   |  6 ++--
 compiler/typecheck/TcRnTypes.hs                  |  7 +++++
 testsuite/tests/patsyn/should_fail/T10873.hs     | 10 +++++++
 testsuite/tests/patsyn/should_fail/T10873.stderr | 24 +++++++++++++++
 testsuite/tests/patsyn/should_fail/all.T         |  1 +
 6 files changed, 75 insertions(+), 10 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 116528c8429257a0ae855251fd266547bb23d01d


More information about the ghc-commits mailing list