blob: c64a9f38b8a2e57807d2dda305009bb861e708f8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
import qualified GHC
import System.Environment
main = do
(libdir:_) <- getArgs
GHC.runGhcT (Just libdir) $ do
-- begin initialize
df0 <- GHC.getSessionDynFlags
let df1 = df0{GHC.ghcMode = GHC.CompManager,
GHC.backend = GHC.interpreterBackend,
GHC.ghcLink = GHC.LinkInMemory,
GHC.verbosity = 0}
_ <- GHC.setSessionDynFlags df1
-- begin reset
GHC.setContext []
GHC.setTargets []
_ <- GHC.load GHC.LoadAllTargets
return ()
|