aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Typecheck.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Typecheck.hs b/src/Typecheck.hs
index 02b9871..716f15f 100644
--- a/src/Typecheck.hs
+++ b/src/Typecheck.hs
@@ -8,11 +8,11 @@ type Environment = [(Idnt,Typ)]
assertInt TInt = Just ()
assertInt _ = Nothing
-assertRec (Record _) = Just ()
+assertRec (TRecord ts) = Just ts
assertRec _ = Nothing
-assertVar (Variant _ _) = Just ()
+assertVar (TVariant ts) = Just ts
assertVar _ = Nothing
-assertPtr (TPtr _) = Just ()
+assertPtr (TPtr t) = Just t
assertPtr _ = Nothing
inferExpr :: Expr -> Environment -> Maybe Typ