Update examples

This commit is contained in:
Don Stewart
2005-09-03 04:45:14 +00:00
parent 5321754614
commit dff0363224
421 changed files with 19 additions and 9 deletions

View File

@ -0,0 +1,3 @@
module Bar where
bar = undef {- error -}

View File

@ -0,0 +1,3 @@
module Foo where
foo = undefined

View File

@ -0,0 +1,31 @@
import System.Plugins
import System.Directory
main = do
status <- make "Foo.hs" [] -- should make
print status
status <- make "Foo.hs" [] -- shouldn't make
print status
status <- merge "Foo.hs" "Bar.hs"
case status of
MergeFailure e -> error $ show e
MergeSuccess _ _ fp -> do {
;status <- make fp [] -- should make
;() <- case status of
MakeSuccess c _ -> print c
MakeFailure _ -> print "make failure"
;status <- make fp [] -- shouldn't make
;case status of
MakeSuccess c _ -> print c
MakeFailure _ -> print "make failure"
;removeFile "Foo.o" -- make test deterministic
}

View File

@ -0,0 +1,4 @@
TEST= make/remake001_should_fail
TOP=../../..
include ../../eval.mk

View File

@ -0,0 +1,4 @@
MakeSuccess ReComp "Foo.o"
MakeSuccess NotReq "Foo.o"
"make failure"
"make failure"