diff options
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/tests/th/T22818.hs | 16 | ||||
-rw-r--r-- | testsuite/tests/th/T22818.stderr | 1 | ||||
-rw-r--r-- | testsuite/tests/th/T22819.hs | 16 | ||||
-rw-r--r-- | testsuite/tests/th/T22819.stderr | 1 | ||||
-rw-r--r-- | testsuite/tests/th/all.T | 2 |
5 files changed, 36 insertions, 0 deletions
diff --git a/testsuite/tests/th/T22818.hs b/testsuite/tests/th/T22818.hs new file mode 100644 index 0000000000..40c89a8c1d --- /dev/null +++ b/testsuite/tests/th/T22818.hs @@ -0,0 +1,16 @@ +{-# LANGUAGE TemplateHaskell #-} +{-# LANGUAGE TypeData #-} +module T22818 where + +import Language.Haskell.TH +import System.IO + +type data T = MkT + +$(pure []) + +$(do i <- reify ''MkT + runIO $ do + hPutStrLn stderr $ pprint i + hFlush stderr + pure []) diff --git a/testsuite/tests/th/T22818.stderr b/testsuite/tests/th/T22818.stderr new file mode 100644 index 0000000000..ca1a04a45a --- /dev/null +++ b/testsuite/tests/th/T22818.stderr @@ -0,0 +1 @@ +Constructor from T22818.T: T22818.MkT :: T22818.T diff --git a/testsuite/tests/th/T22819.hs b/testsuite/tests/th/T22819.hs new file mode 100644 index 0000000000..bd5385abad --- /dev/null +++ b/testsuite/tests/th/T22819.hs @@ -0,0 +1,16 @@ +{-# LANGUAGE TemplateHaskell #-} +{-# LANGUAGE TypeData #-} +module T22818 where + +import Language.Haskell.TH +import System.IO + +type data T = MkT + +$(pure []) + +$(do i <- reify ''T + runIO $ do + hPutStrLn stderr $ pprint i + hFlush stderr + pure []) diff --git a/testsuite/tests/th/T22819.stderr b/testsuite/tests/th/T22819.stderr new file mode 100644 index 0000000000..6389658d1e --- /dev/null +++ b/testsuite/tests/th/T22819.stderr @@ -0,0 +1 @@ +type data T22818.T = T22818.MkT diff --git a/testsuite/tests/th/all.T b/testsuite/tests/th/all.T index 971fb39056..2b30e752aa 100644 --- a/testsuite/tests/th/all.T +++ b/testsuite/tests/th/all.T @@ -556,4 +556,6 @@ test('T21920', normal, compile_and_run, ['']) test('T21723', normal, compile_and_run, ['']) test('T21942', normal, compile_and_run, ['']) test('T22784', normal, compile, ['-v0 -ddump-splices -dsuppress-uniques']) +test('T22818', normal, compile, ['-v0']) +test('T22819', normal, compile, ['-v0']) test('TH_fun_par', normal, compile, ['']) |