[commit: ghc] ghc-8.6: Fix error recovery for pattern synonyms (149d791)

git at git.haskell.org git at git.haskell.org
Wed Jun 27 21:09:45 UTC 2018

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

On branch  : ghc-8.6
Link       : http://ghc.haskell.org/trac/ghc/changeset/149d7912eb84a24861b021c13d2ee61b44de5856/ghc


commit 149d7912eb84a24861b021c13d2ee61b44de5856
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Mon Jun 25 11:42:46 2018 +0100

    Fix error recovery for pattern synonyms
    As Trac #15289 showed, we were carrying on after a type error
    in a pattern synonym, and then crashing.  This patch improves
    error handling for pattern synonyms.
    I also moved a bit of code from TcBinds into TcPatSyn, which
    helpfully narrows the API.
    (cherry picked from commit 2896082ec79f02b6388e038a8dae6cb22fe72dfc)


 compiler/typecheck/TcBinds.hs                    | 11 +--
 compiler/typecheck/TcPatSyn.hs                   | 86 ++++++++++++++++++++----
 compiler/typecheck/TcPatSyn.hs-boot              | 12 ++--
 testsuite/tests/patsyn/should_fail/T15289.stderr | 21 +++---
 testsuite/tests/patsyn/should_fail/all.T         |  2 +-
 5 files changed, 95 insertions(+), 37 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 149d7912eb84a24861b021c13d2ee61b44de5856

More information about the ghc-commits mailing list