diff options
author | tomsmeding <tom.smeding@gmail.com> | 2017-01-24 13:06:02 +0100 |
---|---|---|
committer | tomsmeding <tom.smeding@gmail.com> | 2017-01-24 13:06:02 +0100 |
commit | 68a49640d7cf05c3149da266e820c5ce464aadf8 (patch) | |
tree | cdd0f829de9d6a23065a88ca9d47a40c8a6de428 /main.hs | |
parent | ed225559cd9b54fd0cc696088ad1ed13d51aae04 (diff) |
Generate code for global variables
Diffstat (limited to 'main.hs')
-rw-r--r-- | main.hs | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -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 |