Import hs-plugins cvs
This commit is contained in:
15
examples/load/io/prog/Main.hs
Normal file
15
examples/load/io/prog/Main.hs
Normal file
@ -0,0 +1,15 @@
|
||||
{-# OPTIONS -cpp #-}
|
||||
|
||||
#include "../../../../config.h"
|
||||
|
||||
import Plugins
|
||||
import API
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
m_v <- load "../TestIO.o" ["../api"] [] "resource"
|
||||
v <- case m_v of
|
||||
LoadFailure _ -> error "load failed"
|
||||
LoadSuccess _ v -> return v
|
||||
s <- field v
|
||||
if null s then print False else print True
|
Reference in New Issue
Block a user