diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2016-05-19 15:02:09 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2016-05-24 09:50:26 +0100 |
commit | 03d8960388d64f5d5c9617dd0e21555e9e987e26 (patch) | |
tree | 76d6d552796f420653f3c694af8c01cc9cf1ec42 /testsuite/tests/patsyn/should_compile/all.T | |
parent | 4f5b33529b9e13b49a3ee00e9116b0edc9df1234 (diff) | |
download | haskell-03d8960388d64f5d5c9617dd0e21555e9e987e26.tar.gz |
Don't split the arg types in a PatSyn signature
This patch fixes Trac #11977, and #12108, rather satisfactorily
maily by deleting code!
pattern P :: Eq a => a -> a -> Int
The idea is simply /not/ to split the bit after the '=>' into the
pattern argument types, but to keep the (a->a->Int) part
un-decomposed, in the patsig_body_ty field of a TcPatSynInfo.
There is one awkward wrinkle, which is that we can't split the
implicitly-bound type variables into existential and universal until
we know which types are arguments and which are part of the result.
So we postpone the decision until we have the declaration in hand.
See TcPatSyn Note [The pattern-synonym signature splitting rule]
Diffstat (limited to 'testsuite/tests/patsyn/should_compile/all.T')
-rw-r--r-- | testsuite/tests/patsyn/should_compile/all.T | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/testsuite/tests/patsyn/should_compile/all.T b/testsuite/tests/patsyn/should_compile/all.T index 035cd00401..ff2f14afa1 100644 --- a/testsuite/tests/patsyn/should_compile/all.T +++ b/testsuite/tests/patsyn/should_compile/all.T @@ -54,3 +54,5 @@ test('T11351', normal, compile, ['']) test('T11633', normal, compile, ['']) test('T11959', expect_broken(11959), multimod_compile, ['T11959', '-v0']) test('T12094', normal, compile, ['']) +test('T11977', normal, compile, ['']) +test('T12108', normal, compile, [''])
\ No newline at end of file |