feat: add conversion to tests

This commit is contained in:
rvcas
2022-06-16 16:54:34 -04:00
parent 59a8f6477b
commit b8c5c268d4
3 changed files with 59 additions and 9 deletions

View File

@@ -1,7 +1,7 @@
use std::fs;
use uplc::{
ast::{DeBruijn, FakeNamedDeBruijn, Program},
ast::{DeBruijn, Name, Program},
parser,
};
@@ -46,7 +46,9 @@ fn main() -> anyhow::Result<()> {
UplcCommand::Unflat { input, print } => {
let bytes = std::fs::read(&input)?;
let program = Program::<FakeNamedDeBruijn>::from_flat(&bytes)?;
let program = Program::<DeBruijn>::from_flat(&bytes)?;
let program: Program<Name> = program.try_into()?;
if print {
println!("{:#?}", program);