Update examples
This commit is contained in:
18
testsuite/make/makeall001/prog/Main.hs
Normal file
18
testsuite/make/makeall001/prog/Main.hs
Normal file
@ -0,0 +1,18 @@
|
||||
|
||||
-- little more complex. use the path to the obj file we get back from
|
||||
-- 'make'. load() uses this to find the .hi file
|
||||
|
||||
import System.Plugins
|
||||
import API
|
||||
|
||||
main = do
|
||||
status <- makeAll "../Tiny.hs" ["-i../api"]
|
||||
o <- case status of
|
||||
MakeSuccess _ o -> return o
|
||||
MakeFailure e -> mapM_ putStrLn e >> error "failed"
|
||||
m_v <- load o [".."] [] "resource"
|
||||
v <- case m_v of
|
||||
LoadSuccess _ v -> return v
|
||||
_ -> error "load failed"
|
||||
putStrLn $ field v
|
||||
|
1
testsuite/make/makeall001/prog/expected
Normal file
1
testsuite/make/makeall001/prog/expected
Normal file
@ -0,0 +1 @@
|
||||
abc
|
Reference in New Issue
Block a user