Update examples
This commit is contained in:
13
testsuite/make/null/prog/Main.hs
Normal file
13
testsuite/make/null/prog/Main.hs
Normal file
@ -0,0 +1,13 @@
|
||||
|
||||
-- an example where we want to compile and load a file
|
||||
|
||||
import System.Plugins
|
||||
import API
|
||||
|
||||
main = do
|
||||
make "../Null.hs" ["-i../api"]
|
||||
m_v <- load "../Null.o" ["../api"] [] "resource"
|
||||
v <- case m_v of
|
||||
LoadSuccess _ v -> return v
|
||||
_ -> error "load failed"
|
||||
putStrLn ( show (a v) )
|
Reference in New Issue
Block a user