
Hello Gergö,
you seem to test pattern synonyms in _class_ declarations here. Would
it make sense to also test _instance_ declarations?
Cheers,
Gabor
On 11/1/14, git@git.haskell.org
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/T9705 Link : http://ghc.haskell.org/trac/ghc/changeset/1cca652e8d4a8b87daf70bded87cddc39d...
---------------------------------------------------------------
commit 1cca652e8d4a8b87daf70bded87cddc39d973dab Author: Dr. ERDI Gergo
Date: Tue Oct 21 20:51:55 2014 +0800 Add test case for T9705
---------------------------------------------------------------
1cca652e8d4a8b87daf70bded87cddc39d973dab testsuite/tests/patsyn/should_fail/T9705.hs | 3 +++ testsuite/tests/patsyn/should_fail/T9705.stderr | 4 ++++ testsuite/tests/patsyn/should_fail/all.T | 1 + 3 files changed, 8 insertions(+)
diff --git a/testsuite/tests/patsyn/should_fail/T9705.hs b/testsuite/tests/patsyn/should_fail/T9705.hs new file mode 100644 index 0000000..54d1d00 --- /dev/null +++ b/testsuite/tests/patsyn/should_fail/T9705.hs @@ -0,0 +1,3 @@ +{-# LANGUAGE PatternSynonyms #-} +class C a where + pattern P = () diff --git a/testsuite/tests/patsyn/should_fail/T9705.stderr b/testsuite/tests/patsyn/should_fail/T9705.stderr new file mode 100644 index 0000000..d9a3a49 --- /dev/null +++ b/testsuite/tests/patsyn/should_fail/T9705.stderr @@ -0,0 +1,4 @@ + +T9705.hs:3:5: + Pattern synonyms not allowed in instance declarations + pattern P = () diff --git a/testsuite/tests/patsyn/should_fail/all.T b/testsuite/tests/patsyn/should_fail/all.T index bff6bdf..298f23b 100644 --- a/testsuite/tests/patsyn/should_fail/all.T +++ b/testsuite/tests/patsyn/should_fail/all.T @@ -6,3 +6,4 @@ test('T8961', normal, multimod_compile_fail, ['T8961','']) test('as-pattern', normal, compile_fail, ['']) test('T9161-1', normal, compile_fail, ['']) test('T9161-2', normal, compile_fail, ['']) +test('T9705', normal, compile_fail, [''])
_______________________________________________ ghc-commits mailing list ghc-commits@haskell.org http://www.haskell.org/mailman/listinfo/ghc-commits