diff options
author | Dr. ERDI Gergo <gergo@erdi.hu> | 2014-11-02 14:06:24 +0800 |
---|---|---|
committer | Dr. ERDI Gergo <gergo@erdi.hu> | 2014-11-02 14:08:01 +0800 |
commit | 96c22d9e3591d49a9435e7961563ccd55c0bec0f (patch) | |
tree | 50f68712ebb6a37a540019d63f4a8457d6a3ff55 /testsuite/tests/patsyn | |
parent | 18a4a5dad3cbee3c8bb4005ec09edf401ebe294c (diff) | |
download | haskell-96c22d9e3591d49a9435e7961563ccd55c0bec0f.tar.gz |
Tweak the error message for pattern synonym methods,
since they are disallowed both in class and instance declarations
Diffstat (limited to 'testsuite/tests/patsyn')
-rw-r--r-- | testsuite/tests/patsyn/should_fail/T9705-1.hs (renamed from testsuite/tests/patsyn/should_fail/T9705.hs) | 0 | ||||
-rw-r--r-- | testsuite/tests/patsyn/should_fail/T9705-1.stderr | 4 | ||||
-rw-r--r-- | testsuite/tests/patsyn/should_fail/T9705-2.hs | 6 | ||||
-rw-r--r-- | testsuite/tests/patsyn/should_fail/T9705-2.stderr | 4 | ||||
-rw-r--r-- | testsuite/tests/patsyn/should_fail/T9705.stderr | 4 | ||||
-rw-r--r-- | testsuite/tests/patsyn/should_fail/all.T | 3 |
6 files changed, 16 insertions, 5 deletions
diff --git a/testsuite/tests/patsyn/should_fail/T9705.hs b/testsuite/tests/patsyn/should_fail/T9705-1.hs index 54d1d00e7f..54d1d00e7f 100644 --- a/testsuite/tests/patsyn/should_fail/T9705.hs +++ b/testsuite/tests/patsyn/should_fail/T9705-1.hs diff --git a/testsuite/tests/patsyn/should_fail/T9705-1.stderr b/testsuite/tests/patsyn/should_fail/T9705-1.stderr new file mode 100644 index 0000000000..abe4fe6ada --- /dev/null +++ b/testsuite/tests/patsyn/should_fail/T9705-1.stderr @@ -0,0 +1,4 @@ + +T9705-1.hs:3:5: + Pattern synonyms not allowed in class/instance declarations + pattern P = () diff --git a/testsuite/tests/patsyn/should_fail/T9705-2.hs b/testsuite/tests/patsyn/should_fail/T9705-2.hs new file mode 100644 index 0000000000..463c94b4ff --- /dev/null +++ b/testsuite/tests/patsyn/should_fail/T9705-2.hs @@ -0,0 +1,6 @@ +{-# LANGUAGE PatternSynonyms #-} +class C a where + method :: a + +instance C Int where + pattern P = () diff --git a/testsuite/tests/patsyn/should_fail/T9705-2.stderr b/testsuite/tests/patsyn/should_fail/T9705-2.stderr new file mode 100644 index 0000000000..23f85fa8b5 --- /dev/null +++ b/testsuite/tests/patsyn/should_fail/T9705-2.stderr @@ -0,0 +1,4 @@ + +T9705-2.hs:6:5: + Pattern synonyms not allowed in class/instance declarations + pattern P = () diff --git a/testsuite/tests/patsyn/should_fail/T9705.stderr b/testsuite/tests/patsyn/should_fail/T9705.stderr deleted file mode 100644 index d9a3a495c9..0000000000 --- a/testsuite/tests/patsyn/should_fail/T9705.stderr +++ /dev/null @@ -1,4 +0,0 @@ - -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 298f23bf2a..ea671dcc58 100644 --- a/testsuite/tests/patsyn/should_fail/all.T +++ b/testsuite/tests/patsyn/should_fail/all.T @@ -6,4 +6,5 @@ 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, ['']) +test('T9705-1', normal, compile_fail, ['']) +test('T9705-2', normal, compile_fail, ['']) |