diff options
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] |