aboutsummaryrefslogtreecommitdiff
path: root/Sil/Types.icl
diff options
context:
space:
mode:
authorCamil Staps2017-07-20 20:40:38 +0000
committerCamil Staps2017-07-20 20:40:38 +0000
commit62c9c126ed3eedf981cc087938fd98f7afb17506 (patch)
treebdab83683ff75ab915d3d8af612235c55812d772 /Sil/Types.icl
parentCleanup (diff)
Check the type of the main function (should be Void)
Diffstat (limited to 'Sil/Types.icl')
-rw-r--r--Sil/Types.icl3
1 files changed, 3 insertions, 0 deletions
diff --git a/Sil/Types.icl b/Sil/Types.icl
index 5f17956..40fc0cb 100644
--- a/Sil/Types.icl
+++ b/Sil/Types.icl
@@ -1,5 +1,6 @@
implementation module Sil.Types
+from StdFunc import const
import StdList
import StdOverloaded
import StdString
@@ -34,6 +35,8 @@ typeSize TVoid = 0
typeSize TBool = 1
typeSize TInt = 1
+instance zero TypeResolver where zero = const Nothing
+
instance type Function
where
type res f = Just $ Ok $ foldr (-->) f.f_type [a.arg_type \\ a <- f.f_args]