Commit b80cc025 authored by Ian Lynagh's avatar Ian Lynagh

Add a test for dynCompileExpr

parent a40f26b2
TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
clean:
rm -f *.o *.hi
dynCompileExpr: clean
'$(TEST_HC)' $(TEST_HC_OPTS) --make -v0 -package ghc dynCompileExpr
./dynCompileExpr "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`"
.PHONY: clean dynCompileExpr
test('dynCompileExpr',
normal,
run_command,
['$MAKE -s --no-print-directory dynCompileExpr'])
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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment