From e623b6bb4103f8dda9ed51ae5e0a53343aa76621 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Dybiec?= Date: Thu, 9 Jan 2020 18:13:26 +0100 Subject: Fix asserts --- src/Typecheck.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') 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 -- cgit v1.2.3