From 540a84fb9288699b534e98c8c5d0e649aaa1c2ba Mon Sep 17 00:00:00 2001 From: Joel Kronqvist Date: Thu, 14 Aug 2025 15:42:49 +0300 Subject: feat: added rest of types to the parser also fixed function tests in check.rs --- src/type/check.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/type/check.rs') diff --git a/src/type/check.rs b/src/type/check.rs index ad6be13..2c04d2e 100644 --- a/src/type/check.rs +++ b/src/type/check.rs @@ -111,8 +111,8 @@ impl SExp { /// }; /// /// let varlist = scons(var("a"), Nil); - /// let typelist = scons(Ty(Integer), Nil); - /// let ret = scons(Ty(Integer), Nil); + /// let typelist = Atom(Ty(Integer)); + /// let ret = Atom(Ty(Integer)); /// let body = scons(Add, scons(var("a"), scons(1, Nil))); /// assert_eq!( /// scons(Fun, scons(varlist, scons(typelist, scons(ret, scons(body, Nil))))).type_check(), @@ -127,7 +127,7 @@ impl SExp { /// }; /// /// let varlist = scons(var("a"), scons(var("b"), Nil)); - /// let typelist = scons(Ty(List(vec![Integer])), Nil); + /// let typelist = Atom(Ty(List(vec![Integer, Integer]))); /// let ret = Atom(Ty(Boolean)); /// let body = scons(Eq, varlist.clone()); /// assert_eq!( -- cgit v1.2.3