aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2024-03-14 23:21:53 +0100
committerTom Smeding <tom@tomsmeding.com>2024-03-14 23:21:53 +0100
commite7bed242ba52e6d3233928f2c6189e701cfa5e4c (patch)
tree4bdda2b7bc702c87d97f89946362e6b719126831 /app
parente8f09ff3f9d40922238d646c8fbcbacf9cfdfb62 (diff)
Some typechecker work
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