fix: the following issues
fix conversion from inner opaque type for when and assignment This fixes Clause being used in cases where ListClause or TupleClause should be used Reset defined and zero arg functions between each code gen Fixes for optimizations when encountering shadowed variables
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
use crate::{
|
||||
ast::{Name, Program},
|
||||
ast::{Name, NamedDeBruijn, Program},
|
||||
parser::interner::Interner,
|
||||
};
|
||||
|
||||
@@ -12,5 +12,10 @@ pub fn aiken_optimize_and_intern(program: Program<Name>) -> Program<Name> {
|
||||
|
||||
interner.program(&mut program);
|
||||
|
||||
// Use conversion to Debruijn to prevent optimizations from affecting shadowing
|
||||
let program_named: Program<NamedDeBruijn> = program.try_into().unwrap();
|
||||
|
||||
let program: Program<Name> = program_named.try_into().unwrap();
|
||||
|
||||
program.lambda_reduce().inline_reduce()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user