[commit: ghc] master: Minimise provided dictionaries in pattern synonyms (2c2f3ce)

git at git.haskell.org git at git.haskell.org
Wed Nov 8 11:18:30 UTC 2017


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

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

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

commit 2c2f3cea93733e0c6dd04e1d891082652dcf5ea1
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Wed Nov 8 08:52:06 2017 +0000

    Minimise provided dictionaries in pattern synonyms
    
    Trac #14394 showed that it's possible to get redundant
    constraints in the inferred provided constraints of a pattern
    synonym.  This patch removes the redundancy with mkMinimalBySCs.
    
    To do this I had to generalise the type of mkMinimalBySCs slightly.
    And, to reduce confusing reversal, I made it stable: it now returns
    its result in the same order as its input.  That led to a raft of
    error message wibbles, mostly for the better.


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

2c2f3cea93733e0c6dd04e1d891082652dcf5ea1
 compiler/typecheck/TcDerivInfer.hs                 |  2 +-
 compiler/typecheck/TcErrors.hs                     |  5 +-
 compiler/typecheck/TcPatSyn.hs                     | 56 ++++++++++++++++++++--
 compiler/typecheck/TcSimplify.hs                   |  2 +-
 compiler/typecheck/TcType.hs                       | 52 +++++++++++++-------
 testsuite/tests/ado/ado004.stderr                  | 18 +++----
 .../tests/deriving/should_fail/drvfail004.stderr   |  2 +-
 .../tests/determinism/determ021/determ021.stdout   |  4 +-
 testsuite/tests/ghci/scripts/T10963.stdout         |  2 +-
 testsuite/tests/ghci/scripts/T11524a.stdout        | 16 +++----
 testsuite/tests/ghci/scripts/T11975.stdout         |  2 +-
 testsuite/tests/ghci/scripts/T12550.stdout         |  6 +--
 .../indexed-types/should_compile/T3017.stderr      |  2 +-
 .../indexed-types/should_compile/T8889.stderr      |  2 +-
 .../tests/indexed-types/should_fail/T1897b.stderr  |  2 +-
 .../should_compile/ExtraConstraints1.stderr        |  2 +-
 .../should_compile/ExtraConstraints3.stderr        | 38 +++++++--------
 .../partial-sigs/should_compile/T12844.stderr      |  6 +--
 .../partial-sigs/should_compile/T13482.stderr      |  8 ++--
 .../partial-sigs/should_compile/T14217.stderr      | 46 +++++++++---------
 .../tests/patsyn/should_compile/T11213.stderr      |  8 ++--
 .../tests/patsyn/should_compile/T14394.script      | 24 ++++++++++
 .../should_compile/T14394.stdout}                  |  0
 testsuite/tests/patsyn/should_compile/all.T        |  1 +
 testsuite/tests/rebindable/rebindable6.stderr      |  3 +-
 testsuite/tests/typecheck/should_compile/Makefile  |  4 ++
 .../tests/typecheck/should_compile/holes2.stderr   |  2 +-
 testsuite/tests/typecheck/should_fail/T8883.stderr |  2 +-
 .../tests/typecheck/should_fail/tcfail133.stderr   |  2 +-
 29 files changed, 205 insertions(+), 114 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 2c2f3cea93733e0c6dd04e1d891082652dcf5ea1


More information about the ghc-commits mailing list