summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-api/dynCompileExpr/dynCompileExpr.hs
blob: 9cdd3f0b7db4ad55caf113730184b4032576cc4c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

module Main where

import GHC
import MonadUtils

import System.Environment

main :: IO ()
main = do [libdir] <- getArgs
          runGhc (Just libdir) doit

doit :: Ghc ()
doit = do
  getSessionDynFlags >>= setSessionDynFlags
  dyn <- dynCompileExpr "()"
  liftIO $ print dyn