[commit: ghc] ghc-8.0: Fundeps work even for unary type classes (8719d87)
git at git.haskell.org
git at git.haskell.org
Thu Nov 10 21:42:32 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-8.0
Link : http://ghc.haskell.org/trac/ghc/changeset/8719d871bac848ee10e7455b5821a18dabd48b5b/ghc
>---------------------------------------------------------------
commit 8719d871bac848ee10e7455b5821a18dabd48b5b
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Wed Oct 26 10:54:16 2016 +0100
Fundeps work even for unary type classes
The functional-dependency improvement functions,
improveFromAnother
improveFromInstEnv
had a side-condition that said the type class has to have at
least two arguments. But not so, as Trac #12763 shows:
class C a | -> a where ...
is perfectly legal, albeit a bit of a corner case.
(cherry picked from commit 801c26372742fc79bd3756bdcb710031c716c402)
>---------------------------------------------------------------
8719d871bac848ee10e7455b5821a18dabd48b5b
compiler/typecheck/FunDeps.hs | 3 +-
testsuite/tests/typecheck/should_compile/T12763.hs | 13 +++++
.../tests/typecheck/should_compile/T12763.stderr | 14 +++++
testsuite/tests/typecheck/should_compile/all.T | 1 +
testsuite/tests/typecheck/should_fail/T5684.stderr | 60 +++-------------------
5 files changed, 35 insertions(+), 56 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 8719d871bac848ee10e7455b5821a18dabd48b5b
More information about the ghc-commits
mailing list