[commit: ghc] master: Fix partial sigs and pattern bindings interaction (e1ff2b4)

git at git.haskell.org git at git.haskell.org
Tue May 10 08:31:24 UTC 2016


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

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

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

commit e1ff2b4950a02bc26b9ab36c9c589a8156e324bd
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Mon May 9 13:08:02 2016 +0100

    Fix partial sigs and pattern bindings interaction
    
    It turns out that GHC 8.0 would accept entirely bogus
    programs like
    
       f2 :: (True, _) -> Char
       Just f2 = Just (\x->x)
    
    (which is now partial-sigs/should_fail/PatBind3)
    
    This also fixes Trac #9478, test `PatBind2`.


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

e1ff2b4950a02bc26b9ab36c9c589a8156e324bd
 compiler/typecheck/TcPat.hs                        | 96 +++++++++++++++++++---
 testsuite/tests/partial-sigs/should_compile/all.T  |  2 +-
 .../tests/partial-sigs/should_fail/PatBind3.hs     |  6 ++
 .../tests/partial-sigs/should_fail/PatBind3.stderr |  9 ++
 testsuite/tests/partial-sigs/should_fail/all.T     |  1 +
 5 files changed, 100 insertions(+), 14 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 e1ff2b4950a02bc26b9ab36c9c589a8156e324bd


More information about the ghc-commits mailing list