aboutsummaryrefslogtreecommitdiff
path: root/src/type
diff options
context:
space:
mode:
Diffstat (limited to 'src/type')
-rw-r--r--src/type/check.rs6
-rw-r--r--src/type/display.rs2
2 files changed, 4 insertions, 4 deletions
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!(
diff --git a/src/type/display.rs b/src/type/display.rs
index 27f1427..b562d7b 100644
--- a/src/type/display.rs
+++ b/src/type/display.rs
@@ -32,7 +32,7 @@ impl fmt::Display for Type {
VecType => write!(f, "{}", "Vector"),
LetType => write!(f, "{}", "Let"),
NilType => write!(f, "Nil"),
- TypeLit => write!(f, "[type literal]"),
+ TypeLit => write!(f, "Type"),
VecOf(ty) => write!(f, "({} ...)", *ty),
Arrow(a, b) => write!(f, "({} -> {})", a, b),
List(types) => write!(