Remove more unused code
This commit is contained in:
parent
ce2a65b044
commit
6da6f6312d
@ -356,7 +356,6 @@ impl PatternLiteral {
|
|||||||
impl Declaration {
|
impl Declaration {
|
||||||
fn reduce(&self, symbol_table: &SymbolTable) -> Stmt {
|
fn reduce(&self, symbol_table: &SymbolTable) -> Stmt {
|
||||||
use self::Declaration::*;
|
use self::Declaration::*;
|
||||||
use crate::ast::Signature;
|
|
||||||
match self {
|
match self {
|
||||||
Binding {name, constant, expr, .. } => Stmt::Binding { name: name.clone(), constant: *constant, expr: expr.node().reduce(symbol_table) },
|
Binding {name, constant, expr, .. } => Stmt::Binding { name: name.clone(), constant: *constant, expr: expr.node().reduce(symbol_table) },
|
||||||
FuncDecl(Signature { name, params, .. }, statements) => Stmt::PreBinding {
|
FuncDecl(Signature { name, params, .. }, statements) => Stmt::PreBinding {
|
||||||
|
@ -85,7 +85,6 @@ impl TypeConst {
|
|||||||
StringT => format!("String"),
|
StringT => format!("String"),
|
||||||
Bool => format!("Bool"),
|
Bool => format!("Bool"),
|
||||||
Ordering => format!("Ordering"),
|
Ordering => format!("Ordering"),
|
||||||
_ => format!("UNKNOWN TYPE"),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -360,7 +359,7 @@ impl<'a> TypeContext<'a> {
|
|||||||
self.unify(t2, t3)
|
self.unify(t2, t3)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn lambda(&mut self, params: &Vec<FormalParam>, type_anno: &Option<TypeIdentifier>, body: &Block) -> InferResult<Type> {
|
fn lambda(&mut self, params: &Vec<FormalParam>, type_anno: &Option<TypeIdentifier>, _body: &Block) -> InferResult<Type> {
|
||||||
let argument_types: InferResult<Vec<Type>> = params.iter().map(|param: &FormalParam| {
|
let argument_types: InferResult<Vec<Type>> = params.iter().map(|param: &FormalParam| {
|
||||||
if let (_, Some(type_identifier)) = param {
|
if let (_, Some(type_identifier)) = param {
|
||||||
self.get_type_from_name(type_identifier)
|
self.get_type_from_name(type_identifier)
|
||||||
|
Loading…
Reference in New Issue
Block a user