Commit 9e2ad08f authored by simonpj's avatar simonpj
Browse files

[project @ 2001-11-06 14:39:29 by simonpj]

Add another demand test
parent dc9bc508
TOP=../../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
...@@ -6,4 +6,5 @@ include ($confdir ++ "/../vanilla-test.T") ...@@ -6,4 +6,5 @@ include ($confdir ++ "/../vanilla-test.T")
-- expected process return value, if not zero -- expected process return value, if not zero
test "strun001" { vtr("", "", "") } test "strun001" { vtr("", "", "") }
test "strun002" { vtr("-O", "", "1") }
-- 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))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment