Test Trac #5712
authorSimon Peyton Jones <simonpj@microsoft.com>
Fri, 23 Dec 2011 16:06:47 +0000 (16:06 +0000)
committerSimon Peyton Jones <simonpj@microsoft.com>
Fri, 23 Dec 2011 16:06:47 +0000 (16:06 +0000)
testsuite/tests/deriving/should_run/T5712.hs [new file with mode: 0644]
testsuite/tests/deriving/should_run/T5712.stdout [new file with mode: 0644]
testsuite/tests/deriving/should_run/all.T

diff --git a/testsuite/tests/deriving/should_run/T5712.hs b/testsuite/tests/deriving/should_run/T5712.hs
new file mode 100644 (file)
index 0000000..a582b10
--- /dev/null
@@ -0,0 +1,14 @@
+{-# LANGUAGE GADTs #-}
+
+module Main where
+
+infix 5 :*: 
+data T a where
+  (:*:) :: Int -> a -> T a
+  (:+:) :: Char -> T a -> T a
+  deriving( Show )
+
+ -- The Show should print (:*:) infix, but (:+:) prefix, 
+ -- since it lacks a fixity declaration
+
+main = print ('x' :+: (3 :*: True))
diff --git a/testsuite/tests/deriving/should_run/T5712.stdout b/testsuite/tests/deriving/should_run/T5712.stdout
new file mode 100644 (file)
index 0000000..42f8cea
--- /dev/null
@@ -0,0 +1 @@
+(:+:) 'x' (3 :*: True)
index dba61e0..480bdba 100644 (file)
@@ -33,4 +33,5 @@ test('T4136', normal, compile_and_run, [''])
 test('T4528a', normal, compile_and_run, [''])
 test('T5041', normal, compile_and_run, [''])
 test('T5628', exit_code(1), compile_and_run, [''])
+test('T5712', normal, compile_and_run, [''])