[commit: ghc] ghc-8.0: Improve pattern synonym error messages (add `PatSynOrigin`) (1d74e4d)

git at git.haskell.org git at git.haskell.org
Wed Mar 23 16:38:29 UTC 2016


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

On branch  : ghc-8.0
Link       : http://ghc.haskell.org/trac/ghc/changeset/1d74e4d7970ccc6e8ef431bbd42a4a29d870f823/ghc

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

commit 1d74e4d7970ccc6e8ef431bbd42a4a29d870f823
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


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

1d74e4d7970ccc6e8ef431bbd42a4a29d870f823
 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 1d74e4d7970ccc6e8ef431bbd42a4a29d870f823


More information about the ghc-commits mailing list