diff options
Diffstat (limited to 'testsuite/tests/stranal/should_run/strun001.hs')
-rw-r--r-- | testsuite/tests/stranal/should_run/strun001.hs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/stranal/should_run/strun001.hs b/testsuite/tests/stranal/should_run/strun001.hs new file mode 100644 index 0000000000..43820f3028 --- /dev/null +++ b/testsuite/tests/stranal/should_run/strun001.hs @@ -0,0 +1,15 @@ +-- Made the new demand analyser enter an absent arg +-- Reason: it thought 'a' was unused in g. + +module Main where + +-- Strictness: SS(AL) -> T +f True p@(x,y) = (p,y) +f False p@(x,y) = f y p + +-- Easy to get the wrong strictness, +-- by thinking 'a' is absent +g True a b = f False (a,b) +g False a b = g b a b + +main = print (g True 'a' True) |