diff options
author | Camil Staps | 2017-07-20 20:40:38 +0000 |
---|---|---|
committer | Camil Staps | 2017-07-20 20:40:38 +0000 |
commit | 62c9c126ed3eedf981cc087938fd98f7afb17506 (patch) | |
tree | bdab83683ff75ab915d3d8af612235c55812d772 /Sil/Types.icl | |
parent | Cleanup (diff) |
Check the type of the main function (should be Void)
Diffstat (limited to 'Sil/Types.icl')
-rw-r--r-- | Sil/Types.icl | 3 |
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] |