feat: use new generate_raw function
This commit is contained in:
parent
7d67f1497c
commit
1d462314c4
|
@ -31,11 +31,11 @@ use crate::{
|
|||
};
|
||||
use aiken_lang::{
|
||||
ast::{
|
||||
DataTypeKey, Definition, FunctionAccessKey, ModuleKind, Tracing, TypedDataType,
|
||||
DataTypeKey, Definition, FunctionAccessKey, ModuleKind, Span, Tracing, TypedDataType,
|
||||
TypedFunction,
|
||||
},
|
||||
builtins,
|
||||
expr::UntypedExpr,
|
||||
builtins::{self, function},
|
||||
expr::{TypedExpr, UntypedExpr},
|
||||
gen_uplc::CodeGenerator,
|
||||
line_numbers::LineNumbers,
|
||||
tipo::{Type, TypeInfo},
|
||||
|
@ -465,12 +465,7 @@ where
|
|||
}
|
||||
|
||||
pub fn export(&self, module: &str, name: &str) -> Result<String, Error> {
|
||||
let mut generator = self.checked_modules.new_generator(
|
||||
&self.functions,
|
||||
&self.data_types,
|
||||
&self.module_types,
|
||||
Tracing::silent(),
|
||||
);
|
||||
let mut generator = self.new_generator(Tracing::silent());
|
||||
|
||||
self.checked_modules
|
||||
.get(module)
|
||||
|
@ -495,7 +490,7 @@ where
|
|||
})
|
||||
})
|
||||
.map(|body| {
|
||||
let program = generator.generate_test(&body, &name.to_string());
|
||||
let program = generator.generate_raw(&body, &[], module);
|
||||
|
||||
program.to_pretty()
|
||||
})
|
||||
|
|
|
@ -23,7 +23,7 @@ pub fn exec(
|
|||
name,
|
||||
}: Args,
|
||||
) -> miette::Result<()> {
|
||||
with_project(directory.as_deref(), false, |p| {
|
||||
with_project(directory.as_deref(), 0, false, |p| {
|
||||
p.compile(Options::default())?;
|
||||
|
||||
let raw_uplc = p.export(&module, &name)?;
|
||||
|
|
Loading…
Reference in New Issue