summaryrefslogtreecommitdiff
path: root/testsuite/tests
diff options
context:
space:
mode:
authorSylvain Henry <sylvain@haskus.fr>2021-01-06 10:14:13 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-01-17 05:52:26 -0500
commit84dcb8440e94fab5aaba66e613de27d89264f076 (patch)
tree5b04cd3e7ba11352b61c3b042d23d8d8f2f47f52 /testsuite/tests
parent55a8f86024098ae62d6a2aa00ae850de0e2bc79d (diff)
downloadhaskell-84dcb8440e94fab5aaba66e613de27d89264f076.tar.gz
Revert "Remove SpecConstrAnnotation (#13681)" (#19168)
This reverts commit 7bc3a65b467c4286377b9bded277d5a2f69160b3. NoSpecConstr is used in the wild (see #19168)
Diffstat (limited to 'testsuite/tests')
-rw-r--r--testsuite/tests/simplCore/should_compile/T19168.hs6
-rw-r--r--testsuite/tests/simplCore/should_compile/T5550.hs5
-rw-r--r--testsuite/tests/simplCore/should_compile/T7944.hs4
-rw-r--r--testsuite/tests/simplCore/should_compile/all.T1
4 files changed, 14 insertions, 2 deletions
diff --git a/testsuite/tests/simplCore/should_compile/T19168.hs b/testsuite/tests/simplCore/should_compile/T19168.hs
new file mode 100644
index 0000000000..7e271a2c61
--- /dev/null
+++ b/testsuite/tests/simplCore/should_compile/T19168.hs
@@ -0,0 +1,6 @@
+module T19168 where
+
+import GHC.Exts (SpecConstrAnnotation(..))
+
+{-# ANN type List NoSpecConstr #-}
+newtype List a = List { unList :: [a] }
diff --git a/testsuite/tests/simplCore/should_compile/T5550.hs b/testsuite/tests/simplCore/should_compile/T5550.hs
index 25788c09e3..025da505f3 100644
--- a/testsuite/tests/simplCore/should_compile/T5550.hs
+++ b/testsuite/tests/simplCore/should_compile/T5550.hs
@@ -1,6 +1,9 @@
module T5550 where
-import GHC.Types
+import GHC.Exts ( SpecConstrAnnotation(..) )
+
+data SPEC = SPEC | SPEC2
+{-# ANN type SPEC ForceSpecConstr #-}
loop :: SPEC -> [Int] -> [Int] -> [Int]
loop SPEC z [] = z
diff --git a/testsuite/tests/simplCore/should_compile/T7944.hs b/testsuite/tests/simplCore/should_compile/T7944.hs
index 7f9acbf0c7..7fa0e2d279 100644
--- a/testsuite/tests/simplCore/should_compile/T7944.hs
+++ b/testsuite/tests/simplCore/should_compile/T7944.hs
@@ -1,6 +1,8 @@
module T7944 where
-import GHC.Types
+import GHC.Exts
+
+-- Force specialisation of "go"
-- This is more or less just an ordinary fold
go :: SPEC -> [a] -> IntMap a -> IntMap a
diff --git a/testsuite/tests/simplCore/should_compile/all.T b/testsuite/tests/simplCore/should_compile/all.T
index 51d35322d1..d62a7ce0e6 100644
--- a/testsuite/tests/simplCore/should_compile/all.T
+++ b/testsuite/tests/simplCore/should_compile/all.T
@@ -343,3 +343,4 @@ test('T18747B', normal, compile, [''])
test('T18815', only_ways(['optasm']), makefile_test, ['T18815'])
test('T18668', normal, compile, ['-dsuppress-uniques'])
test('T18995', [ grep_errmsg(r'print') ], compile, ['-O -ddump-simpl -dsuppress-uniques'])
+test('T19168', normal, compile, [''])