aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/Main.hs8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/Main.hs b/app/Main.hs
index bf4fcfd..e5144f1 100644
--- a/app/Main.hs
+++ b/app/Main.hs
@@ -8,6 +8,7 @@ import System.Exit (die, exitFailure)
import HSVIS.Diagnostic
import HSVIS.Parser
+import HSVIS.Typecheck
main :: IO ()
@@ -21,8 +22,13 @@ main = do
(errs, Nothing) -> do
sequence_ $ intersperse (putStrLn "") (map (putStrLn . printDiagnostic) errs)
exitFailure
- (errs, res) -> do
+ (errs, Just res) -> do
sequence_ $ intersperse (putStrLn "") (map (putStrLn . printDiagnostic) errs)
return res
print prog
+
+ let (errs, tprog) = typecheck fname source prog
+ sequence_ $ intersperse (putStrLn "") (map (putStrLn . printDiagnostic) errs)
+
+ print tprog