Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

SpecConstr infinite specialisation: test for #5550

  • Loading branch information...
commit 7fb4ac41a673b68fb9ff4383f116d6318aa217fe 1 parent 8697d9a
@amosr amosr authored
View
11 tests/simplCore/should_compile/T5550.hs
@@ -0,0 +1,11 @@
+module T5550 where
+
+import GHC.Exts ( SpecConstrAnnotation(..) )
+
+data SPEC = SPEC | SPEC2
+{-# ANN type SPEC ForceSpecConstr #-}
+
+loop :: SPEC -> [Int] -> [Int] -> [Int]
+loop SPEC z [] = z
+loop SPEC z (x:xs) = loop SPEC (x:z) xs
+
View
3  tests/simplCore/should_compile/T5550.stderr
@@ -0,0 +1,3 @@
+Loading package ghc-prim ... linking ... done.
+Loading package integer-gmp ... linking ... done.
+Loading package base ... linking ... done.
View
1  tests/simplCore/should_compile/all.T
@@ -164,3 +164,4 @@ test('T7796',
extra_clean(['T7796.prep']),
run_command,
['$MAKE -s --no-print-directory T7796'])
+test('T5550', normal, compile, [''])
Please sign in to comment.
Something went wrong with that request. Please try again.