diff options
Diffstat (limited to 'testsuite/tests')
-rw-r--r-- | testsuite/tests/th/T19363.stdout | 3 | ||||
-rw-r--r-- | testsuite/tests/th/T20842.hs | 9 | ||||
-rw-r--r-- | testsuite/tests/th/T20842.stdout | 3 | ||||
-rw-r--r-- | testsuite/tests/th/all.T | 1 |
4 files changed, 15 insertions, 1 deletions
diff --git a/testsuite/tests/th/T19363.stdout b/testsuite/tests/th/T19363.stdout index b6d2c30790..fe404302a8 100644 --- a/testsuite/tests/th/T19363.stdout +++ b/testsuite/tests/th/T19363.stdout @@ -1,5 +1,6 @@ data Operator_0 - = (:*_1) GHC.Types.Int | (:**_2) {(^**_3) :: GHC.Types.Int} + = (:*_1) GHC.Types.Int + | (:**_2) {(^**_3) :: GHC.Types.Int} data (%*%_4) = (:%*%_5) {-# COMPLETE (:%*%_5) :: (%*%_4) #-} {-# ANN type (%*%_4) "yargh" #-} diff --git a/testsuite/tests/th/T20842.hs b/testsuite/tests/th/T20842.hs new file mode 100644 index 0000000000..6758ea732a --- /dev/null +++ b/testsuite/tests/th/T20842.hs @@ -0,0 +1,9 @@ +{-# LANGUAGE TemplateHaskell, GADTs #-} +module Main where + +import Language.Haskell.TH + +main :: IO () +main = do + x <- [d| data MyData where { D1 :: MyData; D2 :: Bool -> MyData } |] + putStrLn $ pprint x diff --git a/testsuite/tests/th/T20842.stdout b/testsuite/tests/th/T20842.stdout new file mode 100644 index 0000000000..8113be91e4 --- /dev/null +++ b/testsuite/tests/th/T20842.stdout @@ -0,0 +1,3 @@ +data MyData_0 where + D1_1 :: MyData_0 + D2_2 :: GHC.Types.Bool -> MyData_0 diff --git a/testsuite/tests/th/all.T b/testsuite/tests/th/all.T index aa953098ce..79cd9ca7d1 100644 --- a/testsuite/tests/th/all.T +++ b/testsuite/tests/th/all.T @@ -544,3 +544,4 @@ test('T20590', normal, compile, ['-v0 -ddump-splices -dsuppress-uniques']) test('T20773', only_ways(['ghci']), ghci_script, ['T20773.script']) test('T20884', normal, compile_fail, ['']) test('T21038', normal, compile, ['']) +test('T20842', normal, compile_and_run, ['']) |