From e7bed242ba52e6d3233928f2c6189e701cfa5e4c Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Thu, 14 Mar 2024 23:21:53 +0100 Subject: Some typechecker work --- app/Main.hs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'app') 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 -- cgit v1.2.3-70-g09d2