summaryrefslogtreecommitdiff
path: root/testsuite/tests/stranal/should_run/strun002.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/stranal/should_run/strun002.hs')
-rw-r--r--testsuite/tests/stranal/should_run/strun002.hs12
1 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/tests/stranal/should_run/strun002.hs b/testsuite/tests/stranal/should_run/strun002.hs
new file mode 100644
index 0000000000..145166964d
--- /dev/null
+++ b/testsuite/tests/stranal/should_run/strun002.hs
@@ -0,0 +1,12 @@
+-- This showed up an "entered-absent-arg" error in 5.02.1
+
+module Main where
+
+is_volatile :: [Int] -> (String,Int) -> Int
+is_volatile [] (destVarName, destPtr)
+ = error ("Variable not found: " ++ "(" ++ (show destPtr) ++ ") " ++ destVarName)
+is_volatile (a:allWrites) (destVarName, destPtr)
+ | a == destPtr = a
+ | otherwise = is_volatile allWrites (destVarName, destPtr)
+
+main = print (is_volatile [] ("hello",2))