Files
docs
scripts
src
testsuite
conf
dynload
eval
hier
iface
load
loadCLib
make
makewith
global_pragma
io
merge00
mergeto0
module_name
multi_make
Bar.hs
Foo.hs
Main.hs
Makefile
Stub.hs
expected
should_fail_0
tiny
unsafeio
misc
multi
objc
pdynload
pkgconf
plugs
reload
shell
unload
unloadAll
README
TIMINGS
build.mk
check.mk
eval.mk
foreign.mk
.gitignore
.travis.yml
AUTHORS
LICENSE
Makefile
README
Setup.lhs
TODO
config.guess
config.h.in
config.mk.in
config.sub
configure
configure.ac
install.sh
plugins.cabal
stack.yaml
shaniqua-plugins/testsuite/makewith/multi_make/Main.hs

38 lines
1.1 KiB
Haskell
Raw Normal View History

2005-04-24 08:51:33 +00:00
import System.Plugins
2005-04-24 08:51:33 +00:00
import System.Directory
a = "Foo.hs" -- user code
b = "Bar.hs" -- more user code
z = "Stub.hs" -- and a stub
main = do
status <- makeWith a z []
s <- case status of
MakeFailure e -> mapM_ putStrLn e >> error "failed"
MakeSuccess n s -> print n >> return s
status <- makeWith b z []
s' <- case status of
MakeFailure e -> mapM_ putStrLn e >> error "failed"
MakeSuccess n s -> print n >> return s
-- shouldn't need to remerge (a,z)
status <- makeWith a z []
t <- case status of
MakeFailure e -> mapM_ putStrLn e >> error "failed"
MakeSuccess n s -> print n >> return s
-- shouldn't need to remerge (b,z)
status <- makeWith b z []
t' <- case status of
MakeFailure e -> mapM_ putStrLn e >> error "failed"
MakeSuccess n s -> print n >> return s
print $ s /= s' -- test we got unique modules
print $ t /= t' -- test we got unique modules
mapM_ makeCleaner [s,s']