summaryrefslogtreecommitdiff
path: root/main.hs
diff options
context:
space:
mode:
Diffstat (limited to 'main.hs')
-rw-r--r--main.hs10
1 files changed, 8 insertions, 2 deletions
diff --git a/main.hs b/main.hs
index 962a01d..7828034 100644
--- a/main.hs
+++ b/main.hs
@@ -5,6 +5,7 @@ import Data.Either
import System.Environment
import System.Exit
+import Check
import Codegen
import Parser
import PShow
@@ -33,7 +34,12 @@ main = do
when (isLeft parseResult) $ dieShow $ fromLeft parseResult
let ast = fromRight parseResult
- -- print ast
putStrLn $ pshow ast
- either die print $ codegen ast "Module" fname
+ checked <- either die return $ checkProgram ast
+ putStrLn "After checking:"
+ putStrLn $ pshow checked
+
+ llvmMod <- either die return $ codegen checked "Module" fname
+ putStrLn "Module:"
+ print llvmMod