Update examples
This commit is contained in:
15
testsuite/unload/sjwtrap/prog/Main.hs
Normal file
15
testsuite/unload/sjwtrap/prog/Main.hs
Normal file
@ -0,0 +1,15 @@
|
||||
|
||||
import System.Plugins
|
||||
import API
|
||||
|
||||
--
|
||||
-- what happens if we try to use code that has been unloaded?
|
||||
--
|
||||
|
||||
main = do
|
||||
m_v <- load "../Null.o" ["../api"] [] "resource"
|
||||
(m,v) <- case m_v of
|
||||
LoadSuccess m v -> return (m,v)
|
||||
_ -> error "load failed"
|
||||
putStrLn ( show (a v) )
|
||||
unload m
|
1
testsuite/unload/sjwtrap/prog/expected
Normal file
1
testsuite/unload/sjwtrap/prog/expected
Normal file
@ -0,0 +1 @@
|
||||
42
|
Reference in New Issue
Block a user