Fixes for GHC 8.x, archive loading, -dynamic, and file generation

This commit is contained in:
Mark Laws
2018-01-20 10:16:48 +09:00
parent 22dabddd73
commit 9eb6ab384e
16 changed files with 458 additions and 216 deletions

View 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