Fixes for GHC 8.x, archive loading, -dynamic, and file generation
This commit is contained in:
22
testsuite/load/plain/prog/Main.hs
Normal file
22
testsuite/load/plain/prog/Main.hs
Normal file
@ -0,0 +1,22 @@
|
||||
module Main (main) where
|
||||
|
||||
import Control.Exception (handle)
|
||||
|
||||
import System.Plugins
|
||||
|
||||
import API
|
||||
|
||||
fexn :: IOError -> IO ()
|
||||
fexn = print
|
||||
|
||||
main :: IO ()
|
||||
main = handle fexn $ do
|
||||
mf <- load "../TestIO.o" ["../api"] [] "resource"
|
||||
case mf of
|
||||
LoadFailure _ -> error "nope"
|
||||
LoadSuccess _ v -> do
|
||||
putStrLn "success"
|
||||
engage v
|
||||
|
||||
engage :: CLIInterface -> IO ()
|
||||
engage plugin = repl plugin
|
Reference in New Issue
Block a user