Test case about HyperStr and UseDemand
authorJoachim Breitner <mail@joachim-breitner.de>
Mon, 2 Dec 2013 18:02:10 +0000 (18:02 +0000)
committerJoachim Breitner <mail@joachim-breitner.de>
Mon, 2 Dec 2013 18:02:10 +0000 (18:02 +0000)
which was used by SPJ to reduce my ignorance, so I want to ensure I do
not break it.

testsuite/tests/stranal/sigs/HyperStrUse.hs [new file with mode: 0644]
testsuite/tests/stranal/sigs/all.T

diff --git a/testsuite/tests/stranal/sigs/HyperStrUse.hs b/testsuite/tests/stranal/sigs/HyperStrUse.hs
new file mode 100644 (file)
index 0000000..88ba3e3
--- /dev/null
@@ -0,0 +1,9 @@
+{-# OPTIONS_GHC -fplugin StrAnalAnnotation #-}
+module HyperStrUse where
+
+import StrAnalAnnotation (StrAnal(StrAnal))
+
+f :: (Int, Int) -> Bool -> Int
+f (x,y) True = error (show x)
+f (x,y) False = x +1
+{-# ANN f (StrAnal "<S(SL),1*U(1*U(U),A)><S,1*U>m") #-}
index 74ddd9f..4080eb9 100644 (file)
@@ -17,4 +17,5 @@ setTestOpts(only_ways(['optasm']))
 test('StrAnalExample', normal, compile, ['--make -package ghc -v0 ' + config.ghc_th_way_flags])
 
 test('T8569', expect_broken(8569), compile, ['--make -package ghc -v0 ' + config.ghc_th_way_flags])
+test('HyperStrUse', normal, compile, ['--make -package ghc -v0 ' + config.ghc_th_way_flags])