From ce2a65b0445fadafadbd5903a0b23a0277dca00c Mon Sep 17 00:00:00 2001 From: greg Date: Mon, 20 May 2019 16:10:50 -0700 Subject: [PATCH] Clean up some unused code --- schala-lang/language/src/symbol_table.rs | 2 +- schala-lang/language/src/typechecking.rs | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/schala-lang/language/src/symbol_table.rs b/schala-lang/language/src/symbol_table.rs index 5966fa4..1c0e28b 100644 --- a/schala-lang/language/src/symbol_table.rs +++ b/schala-lang/language/src/symbol_table.rs @@ -23,7 +23,7 @@ struct ScopeSegment { #[derive(Debug, Clone)] enum ScopeSegmentKind { Function, - Type, + //Type, } //cf. p. 150 or so of Language Implementation Patterns diff --git a/schala-lang/language/src/typechecking.rs b/schala-lang/language/src/typechecking.rs index 9b5480c..99c356c 100644 --- a/schala-lang/language/src/typechecking.rs +++ b/schala-lang/language/src/typechecking.rs @@ -71,7 +71,7 @@ pub enum TypeConst { StringT, Bool, Ordering, - UserDefined + //UserDefined } impl TypeConst { @@ -234,6 +234,7 @@ impl<'a> TypeContext<'a> { } } + /* fn new_env(&'a self, new_var: Rc, ty: Type) -> TypeContext<'a> { let mut new_context = TypeContext { variable_map: self.variable_map.new_scope(None), @@ -243,12 +244,13 @@ impl<'a> TypeContext<'a> { new_context.variable_map.insert(new_var, ty); new_context } + */ fn get_type_from_name(&self, name: &TypeIdentifier) -> InferResult { use self::TypeIdentifier::*; Ok(match name { - Singleton(TypeSingletonName { name, params }) => { + Singleton(TypeSingletonName { name,.. }) => { match Type::from_string(&name) { Some(ty) => ty, None => return TypeError::new(format!("Unknown type name: {}", name))