- mdl' <- buildModuleT "main" repl
- withContext $ \ctx -> withHostTargetMachine $ \tm ->
- withModuleFromAST ctx mdl' $ \mdl -> do
- let spec = defaultCuratedPassSetSpec { optLevel = Just 3 }
- -- this returns true if the module was modified
- withPassManager spec $ flip runPassManager mdl
- Text.hPutStrLn stderr . ("\n" <>) . ppllvm =<< moduleAST mdl
+ withContext $ \ctx -> withHostTargetMachine $ \tm -> do
+ ast <- runReaderT (buildModuleT "main" repl) ctx
+ return ()