testsuite: Add ClassOperator testcase
authorBen Gamari <bgamari.foss@gmail.com>
Sun, 20 Dec 2015 14:21:10 +0000 (15:21 +0100)
committerBen Gamari <ben@smart-cactus.org>
Mon, 21 Dec 2015 12:01:44 +0000 (13:01 +0100)
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

testsuite/tests/typecheck/should_compile/ClassOperator.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_compile/all.T

diff --git a/testsuite/tests/typecheck/should_compile/ClassOperator.hs b/testsuite/tests/typecheck/should_compile/ClassOperator.hs
new file mode 100644 (file)
index 0000000..6d41d11
--- /dev/null
@@ -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 **<, <**
index ae2aa94..5b09782 100644 (file)
@@ -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, [''])