aboutsummaryrefslogtreecommitdiff
path: root/src/type/check.rs
diff options
context:
space:
mode:
authorJoel Kronqvist <joel.kronqvist@iki.fi>2025-08-14 14:02:27 +0300
committerJoel Kronqvist <joel.kronqvist@iki.fi>2025-08-14 14:02:27 +0300
commit907bd54d19f6bf14a130a136df6f37cc5d256468 (patch)
tree28e282e040d05f107833a48fa27e8498746dfbda /src/type/check.rs
parent52263c39dd6006cce5fc938ec60751ab45b73f8b (diff)
downloadmyslip-907bd54d19f6bf14a130a136df6f37cc5d256468.tar.gz
myslip-907bd54d19f6bf14a130a136df6f37cc5d256468.zip
feat: parsing of new types (T, (int ...), (int bool)) etc. also fixed bug in into_type (it didn't handle lists recursively)
Diffstat (limited to 'src/type/check.rs')
-rw-r--r--src/type/check.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/type/check.rs b/src/type/check.rs
index 02b629c..69e9141 100644
--- a/src/type/check.rs
+++ b/src/type/check.rs
@@ -218,10 +218,10 @@ impl SExp {
pub fn type_check(&self) -> Result<Type, TypeError> {
let res = self.infer_type(HashMap::new());
match res {
- Ok(res) => {println!("maybe unbound: {}", res); match res.is_concrete() {
+ Ok(res) => match res.is_concrete() {
Ok(()) => Ok(res),
Err(name) => Err(UnboundGeneric(name)),
- }},
+ },
e => e,
}
}