summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2015-12-20 15:21:10 +0100
committerBen Gamari <ben@smart-cactus.org>2015-12-21 13:01:44 +0100
commit9f23dd9d05eb0945fa7a60492d2f2721d364327b (patch)
treeb5f7fc1c6057117a1f801265efb14ce6e66f0533
parent6457903e7671b6096d2cca5d965f43daee3572a6 (diff)
downloadhaskell-9f23dd9d05eb0945fa7a60492d2f2721d364327b.tar.gz
testsuite: Add ClassOperator testcase
This is derived from Haddock's `Operators` `html-test`, which appears to fail with GHC master yet compiles with 7.10.2 Reviewers: simonpj, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1667 GHC Trac Issues: #11264
-rw-r--r--testsuite/tests/typecheck/should_compile/ClassOperator.hs21
-rw-r--r--testsuite/tests/typecheck/should_compile/all.T1
2 files changed, 22 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/ClassOperator.hs b/testsuite/tests/typecheck/should_compile/ClassOperator.hs
new file mode 100644
index 0000000000..6d41d113fb
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/ClassOperator.hs
@@ -0,0 +1,21 @@
+{-# LANGUAGE PatternSynonyms, TypeOperators, TypeFamilies, MultiParamTypeClasses, GADTs #-}
+
+module ClassOperator where
+
+-- | Class with fixity, including associated types
+class a ><> b where
+ type a <>< b :: *
+ data a ><< b
+ (>><), (<<>) :: a -> b -> ()
+
+ -- | Multiple fixities
+ (**>), (**<), (>**), (<**) :: a -> a -> ()
+
+infixr 1 ><>
+infixl 2 <><
+infixl 3 ><<
+infixr 4 >><
+infixl 5 <<>
+
+infixr 8 **>, >**
+infixl 8 **<, <**
diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T
index ae2aa9479d..5b09782984 100644
--- a/testsuite/tests/typecheck/should_compile/all.T
+++ b/testsuite/tests/typecheck/should_compile/all.T
@@ -481,3 +481,4 @@ test('T10935', normal, compile, [''])
test('T10971a', normal, compile, [''])
test('T11237', normal, compile, [''])
test('T10592', normal, compile, [''])
+test('ClassOperator', expect_broken(11264), compile, [''])