aboutsummaryrefslogtreecommitdiff
path: root/src/Ast.hs
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2022-08-13 08:14:18 +0100
committerJuan J. Martinez <jjm@usebox.net>2022-08-13 08:14:18 +0100
commit326386322d26b633672de37f045a53f18f2336a5 (patch)
treef2f26d1b94fd79d01cfc97377a1b4e66c57ee1c1 /src/Ast.hs
parentd1fc24d2f17ca1649717c76a130db3869b6abc88 (diff)
downloadmicro-lang-hs-326386322d26b633672de37f045a53f18f2336a5.tar.gz
micro-lang-hs-326386322d26b633672de37f045a53f18f2336a5.zip
Probably better
Diffstat (limited to 'src/Ast.hs')
-rw-r--r--src/Ast.hs4
1 files changed, 4 insertions, 0 deletions
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