diff options
author | Andrew Martin <andrew.thaddeus@gmail.com> | 2019-01-21 16:04:30 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2019-01-27 23:30:47 -0500 |
commit | 79a5afb613235e93bc2c580987595b9c1324db15 (patch) | |
tree | c92aab72c22a18044cc1c56d9761303624e409e1 /testsuite | |
parent | 6da9f4c8df7a216234ef50104e400cdcbfbc1bd4 (diff) | |
download | haskell-79a5afb613235e93bc2c580987595b9c1324db15.tar.gz |
Test that hsc2hs works with promoted data constructors
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/tests/hsc2hs/Makefile | 5 | ||||
-rw-r--r-- | testsuite/tests/hsc2hs/T11004.hsc | 13 | ||||
-rw-r--r-- | testsuite/tests/hsc2hs/all.T | 2 |
3 files changed, 20 insertions, 0 deletions
diff --git a/testsuite/tests/hsc2hs/Makefile b/testsuite/tests/hsc2hs/Makefile index b0751f1e50..9291e4bc74 100644 --- a/testsuite/tests/hsc2hs/Makefile +++ b/testsuite/tests/hsc2hs/Makefile @@ -41,6 +41,11 @@ T10272: '$(TEST_HC)' $(TEST_HC_OPTS) -v0 --make $@ ./$@ +.PHONY: T11004 +T11004: + LANG=C '$(HSC2HS)' $@.hsc + '$(TEST_HC)' $(TEST_HC_OPTS) -c $@.hs + .PHONY: T12504 T12504: '$(HSC2HS)' T12504/path/to/$@.hsc diff --git a/testsuite/tests/hsc2hs/T11004.hsc b/testsuite/tests/hsc2hs/T11004.hsc new file mode 100644 index 0000000000..796d35a451 --- /dev/null +++ b/testsuite/tests/hsc2hs/T11004.hsc @@ -0,0 +1,13 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE GADTs #-} +{-# LANGUAGE KindSignatures #-} + +module T11004 where + +import Data.Kind (Type) + +data Foo = Foo' | Bar + +data Indexed :: Foo -> Type where + IndexedA :: Indexed ' Foo' + IndexedB :: Indexed 'Bar diff --git a/testsuite/tests/hsc2hs/all.T b/testsuite/tests/hsc2hs/all.T index f237d9ac59..d42f38589f 100644 --- a/testsuite/tests/hsc2hs/all.T +++ b/testsuite/tests/hsc2hs/all.T @@ -14,6 +14,8 @@ test('T4340', [], run_command, ['$MAKE -s --no-print-directory T4340']) test('T10272', [], run_command, ['$MAKE -s --no-print-directory T10272']) +test('T11004', [], run_command, ['$MAKE -s --no-print-directory T11004']) + test('T12504', [extra_files(['T12504']), ignore_stdout], run_command, ['$MAKE -s --no-print-directory T12504']) |