From 326386322d26b633672de37f045a53f18f2336a5 Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Sat, 13 Aug 2022 08:14:18 +0100 Subject: Probably better --- src/Ast.hs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/Ast.hs') diff --git a/src/Ast.hs b/src/Ast.hs index c43eed4..7efdfe1 100644 --- a/src/Ast.hs +++ b/src/Ast.hs @@ -25,3 +25,7 @@ data Op | Mul | Div deriving (Eq, Ord, Show) + +toFuncType :: [FuncParam] -> Maybe Type -> Type +toFuncType params rtyp = + FuncType (map (\(_, t, _) -> t) params) rtyp -- cgit v1.2.3