Compare commits

..

No commits in common. "5f1d437b29313e6cd402e07a1882b406707d8f85" and "f4310bcf3392696c019e7158fbfc4296533aed17" have entirely different histories.

29 changed files with 68 additions and 212 deletions

View File

@ -1,20 +1,5 @@
# Changelog # Changelog
## v1.0.18-alpha - 2023-MM-DD
### Added
- **aiken-lang**: Code gen now allows for mutual recursion
### Fixed
- **aiken-lang**: fixed stack overflow with unbound typing being passed into a
function with inferred types
### Changed
- **aiken-lang**: (Code Gen): Rename some of the types to use aliases
## v1.0.17-alpha - 2023-09-20 ## v1.0.17-alpha - 2023-09-20
### Added ### Added

View File

@ -42,8 +42,8 @@ use self::{
builder::{ builder::{
cast_validator_args, constants_ir, convert_type_to_data, extract_constant, cast_validator_args, constants_ir, convert_type_to_data, extract_constant,
lookup_data_type_by_tipo, modify_cyclic_calls, modify_self_calls, rearrange_list_clauses, lookup_data_type_by_tipo, modify_cyclic_calls, modify_self_calls, rearrange_list_clauses,
AssignmentProperties, ClauseProperties, CycleFunctionNames, DataTypeKey, FunctionAccessKey, AssignmentProperties, ClauseProperties, DataTypeKey, FunctionAccessKey, HoistableFunction,
HoistableFunction, Variant, Variant,
}, },
tree::{AirExpression, AirTree, TreePath}, tree::{AirExpression, AirTree, TreePath},
}; };
@ -58,7 +58,7 @@ pub struct CodeGenerator<'a> {
code_gen_functions: IndexMap<String, CodeGenFunction>, code_gen_functions: IndexMap<String, CodeGenFunction>,
zero_arg_functions: IndexMap<(FunctionAccessKey, Variant), Vec<Air>>, zero_arg_functions: IndexMap<(FunctionAccessKey, Variant), Vec<Air>>,
cyclic_functions: cyclic_functions:
IndexMap<(FunctionAccessKey, Variant), (CycleFunctionNames, usize, FunctionAccessKey)>, IndexMap<(FunctionAccessKey, Variant), (Vec<String>, usize, FunctionAccessKey)>,
tracing: bool, tracing: bool,
id_gen: IdGenerator, id_gen: IdGenerator,
} }
@ -675,8 +675,7 @@ impl<'a> CodeGenerator<'a> {
name != "_" name != "_"
} else { } else {
true true
}, }
"No discard expressions or let bindings should be in the tree at this point."
); );
if props.value_type.is_data() && props.kind.is_expect() && !tipo.is_data() { if props.value_type.is_data() && props.kind.is_expect() && !tipo.is_data() {
value = AirTree::cast_from_data(value, tipo.clone()); value = AirTree::cast_from_data(value, tipo.clone());
@ -690,23 +689,25 @@ impl<'a> CodeGenerator<'a> {
location, location,
.. ..
} => { } => {
assert!(props.kind.is_expect()); if props.kind.is_expect() {
let name = format!(
"__expected_by_{}_span_{}_{}",
expected_int, location.start, location.end
);
let name = format!( let assignment = AirTree::let_assignment(&name, value);
"__expected_by_{}_span_{}_{}",
expected_int, location.start, location.end
);
let assignment = AirTree::let_assignment(&name, value); let expect = AirTree::binop(
BinOp::Eq,
let expect = AirTree::binop( bool(),
BinOp::Eq, AirTree::int(expected_int),
bool(), AirTree::local_var(name, int()),
AirTree::int(expected_int), int(),
AirTree::local_var(name, int()), );
int(), AirTree::assert_bool(true, assignment.hoist_over(expect))
); } else {
AirTree::assert_bool(true, assignment.hoist_over(expect)) unreachable!("Code Gen should never reach here")
}
} }
Pattern::Var { name, .. } => { Pattern::Var { name, .. } => {
if props.full_check { if props.full_check {
@ -1367,7 +1368,7 @@ impl<'a> CodeGenerator<'a> {
let tuple_access = AirTree::tuple_access( let tuple_access = AirTree::tuple_access(
tuple_index_names, tuple_index_names,
tipo.clone(), tipo.clone(),
true, false,
AirTree::local_var(tuple_name, tipo.clone()), AirTree::local_var(tuple_name, tipo.clone()),
); );
@ -2822,7 +2823,6 @@ impl<'a> CodeGenerator<'a> {
*dep_path = func_tree_path.common_ancestor(dep_path); *dep_path = func_tree_path.common_ancestor(dep_path);
} }
sorted_function_vec.push((generic_func, variant));
} }
HoistableFunction::Link(_) => todo!("Deal with Link later"), HoistableFunction::Link(_) => todo!("Deal with Link later"),
HoistableFunction::CyclicLink(cyclic_name) => { HoistableFunction::CyclicLink(cyclic_name) => {
@ -2876,10 +2876,10 @@ impl<'a> CodeGenerator<'a> {
*dep_path = func_tree_path.common_ancestor(dep_path); *dep_path = func_tree_path.common_ancestor(dep_path);
} }
sorted_function_vec.push((generic_func, variant));
} }
} }
sorted_function_vec.push((generic_func, variant));
sorting_attempts += 1; sorting_attempts += 1;
} }
sorted_function_vec.dedup(); sorted_function_vec.dedup();
@ -3083,7 +3083,6 @@ impl<'a> CodeGenerator<'a> {
} }
} }
} }
sorted_dep_vec.push((dep.0.clone(), dep.1.clone()));
} }
HoistableFunction::CyclicFunction { deps, .. } => { HoistableFunction::CyclicFunction { deps, .. } => {
for (dep_generic_func, dep_variant) in deps.iter() { for (dep_generic_func, dep_variant) in deps.iter() {
@ -3095,17 +3094,31 @@ impl<'a> CodeGenerator<'a> {
deps_vec.insert(0, (dep_generic_func.clone(), dep_variant.clone())); deps_vec.insert(0, (dep_generic_func.clone(), dep_variant.clone()));
} }
} }
sorted_dep_vec.push((dep.0.clone(), dep.1.clone()));
} }
HoistableFunction::Link(_) => todo!("Deal with Link later"), HoistableFunction::Link(_) => todo!("Deal with Link later"),
HoistableFunction::CyclicLink(cyclic_func) => { HoistableFunction::CyclicLink(cyclic_func) => {
sorted_dep_vec.retain(|(generic_func, variant)| { let (_, HoistableFunction::CyclicFunction { deps, .. }) = functions_to_hoist
!(generic_func == cyclic_func && variant.is_empty()) .get(cyclic_func)
}); .unwrap()
.get("")
.unwrap()
else {
unreachable!()
};
deps_vec.insert(0, (cyclic_func.clone(), "".to_string())); for (dep_generic_func, dep_variant) in deps.iter() {
if !(dep_generic_func == &dep.0 && dep_variant == &dep.1) {
sorted_dep_vec.retain(|(generic_func, variant)| {
!(generic_func == dep_generic_func && variant == dep_variant)
});
deps_vec.insert(0, (dep_generic_func.clone(), dep_variant.clone()));
}
}
} }
} }
sorted_dep_vec.push((dep.0.clone(), dep.1.clone()));
} }
sorted_dep_vec.dedup(); sorted_dep_vec.dedup();

View File

@ -34,8 +34,6 @@ pub type Variant = String;
pub type Params = Vec<String>; pub type Params = Vec<String>;
pub type CycleFunctionNames = Vec<String>;
#[derive(Clone, Debug)] #[derive(Clone, Debug)]
pub enum CodeGenFunction { pub enum CodeGenFunction {
Function { body: AirTree, params: Params }, Function { body: AirTree, params: Params },
@ -756,10 +754,7 @@ pub fn modify_self_calls(
pub fn modify_cyclic_calls( pub fn modify_cyclic_calls(
body: &mut AirTree, body: &mut AirTree,
func_key: &FunctionAccessKey, func_key: &FunctionAccessKey,
cyclic_links: &IndexMap< cyclic_links: &IndexMap<(FunctionAccessKey, Variant), (Vec<String>, usize, FunctionAccessKey)>,
(FunctionAccessKey, Variant),
(CycleFunctionNames, usize, FunctionAccessKey),
>,
) { ) {
body.traverse_tree_with( body.traverse_tree_with(
&mut |air_tree: &mut AirTree, _| { &mut |air_tree: &mut AirTree, _| {
@ -784,35 +779,13 @@ pub fn modify_cyclic_calls(
cyclic_links.get(&(var_key.clone(), variant_name.to_string())) cyclic_links.get(&(var_key.clone(), variant_name.to_string()))
{ {
if *cyclic_name == *func_key { if *cyclic_name == *func_key {
let cyclic_var_name = if cyclic_name.module_name.is_empty() {
cyclic_name.function_name.to_string()
} else {
format!("{}_{}", cyclic_name.module_name, cyclic_name.function_name)
};
let index_name = names[*index].clone(); let index_name = names[*index].clone();
let var = AirTree::var(
ValueConstructor::public(
tipo.clone(),
ValueConstructorVariant::ModuleFn {
name: cyclic_var_name.clone(),
field_map: None,
module: "".to_string(),
arity: 2,
location: Span::empty(),
builtin: None,
},
),
cyclic_var_name,
"".to_string(),
);
*air_tree = AirTree::call( *air_tree = AirTree::call(
var.clone(), air_tree.clone(),
tipo.clone(), tipo.clone(),
vec![ vec![
var, air_tree.clone(),
AirTree::anon_func( AirTree::anon_func(
names.clone(), names.clone(),
AirTree::local_var(index_name, tipo), AirTree::local_var(index_name, tipo),

View File

@ -531,7 +531,6 @@ impl TypeVar {
pub fn get_inner_types(&self) -> Vec<Rc<Type>> { pub fn get_inner_types(&self) -> Vec<Rc<Type>> {
match self { match self {
Self::Link { tipo } => tipo.get_inner_types(), Self::Link { tipo } => tipo.get_inner_types(),
Self::Unbound { .. } => vec![],
var => { var => {
vec![Type::Var { vec![Type::Var {
tipo: RefCell::new(var.clone()).into(), tipo: RefCell::new(var.clone()).into(),

View File

@ -567,8 +567,8 @@ mod tests {
"$ref": "#/definitions/Tuple$Int_Int_Int" "$ref": "#/definitions/Tuple$Int_Int_Int"
} }
}, },
"compiledCode": "58a8010000323232323232322223232323253330084a22930b1919191919299980818090010a4c2a6601a921334c6973742f5475706c652f436f6e73747220636f6e7461696e73206d6f7265206974656d73207468616e2065787065637465640016375a602000260200046eb4c038004c038008dd698060009bac00432375c60120046eb4c01c004c8c8cdd81805801180580098058009bac0035734ae7155ceaab9e5573eae855d101", "compiledCode": "585f01000032323232322223232323253330084a22930b191919191924c6eb4c038004c038008dd6980600098060011bad300a0013758008646eb8c020008dd69803000991919bb03009002300900130090013758006ae6955ceaab9e5742ae881",
"hash": "d21ff2a6ebd64fb9c3bbfe555b7db490a878566185be79241fc22b1e", "hash": "91b63a27e3a0523a1ccef050cb77537ea0b5e3da2e00a05f7db07db2",
"definitions": { "definitions": {
"ByteArray": { "ByteArray": {
"dataType": "bytes" "dataType": "bytes"

View File

@ -13,4 +13,4 @@ requirements = []
source = "github" source = "github"
[etags] [etags]
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1695677318, nanos_since_epoch = 215908000 }, "a5918f742d4589d2f5a91daf232eb03a2a0972a367ec0b016e9e8670e28c1b47"] "aiken-lang/stdlib@main" = [{ secs_since_epoch = 1694643268, nanos_since_epoch = 705101000 }, "a5918f742d4589d2f5a91daf232eb03a2a0972a367ec0b016e9e8670e28c1b47"]

View File

@ -13,4 +13,4 @@ requirements = []
source = "github" source = "github"
[etags] [etags]
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1695677315, nanos_since_epoch = 284801000 }, "a5918f742d4589d2f5a91daf232eb03a2a0972a367ec0b016e9e8670e28c1b47"] "aiken-lang/stdlib@main" = [{ secs_since_epoch = 1694643259, nanos_since_epoch = 603566000 }, "a5918f742d4589d2f5a91daf232eb03a2a0972a367ec0b016e9e8670e28c1b47"]

View File

@ -13,4 +13,4 @@ requirements = []
source = "github" source = "github"
[etags] [etags]
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1695677319, nanos_since_epoch = 110150000 }, "a5918f742d4589d2f5a91daf232eb03a2a0972a367ec0b016e9e8670e28c1b47"] "aiken-lang/stdlib@main" = [{ secs_since_epoch = 1694643281, nanos_since_epoch = 800180000 }, "a5918f742d4589d2f5a91daf232eb03a2a0972a367ec0b016e9e8670e28c1b47"]

View File

@ -13,4 +13,4 @@ requirements = []
source = "github" source = "github"
[etags] [etags]
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1695677332, nanos_since_epoch = 434414000 }, "a5918f742d4589d2f5a91daf232eb03a2a0972a367ec0b016e9e8670e28c1b47"] "aiken-lang/stdlib@main" = [{ secs_since_epoch = 1694643353, nanos_since_epoch = 194744000 }, "a5918f742d4589d2f5a91daf232eb03a2a0972a367ec0b016e9e8670e28c1b47"]

View File

@ -13,4 +13,4 @@ requirements = []
source = "github" source = "github"
[etags] [etags]
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1695677319, nanos_since_epoch = 71300000 }, "a5918f742d4589d2f5a91daf232eb03a2a0972a367ec0b016e9e8670e28c1b47"] "aiken-lang/stdlib@main" = [{ secs_since_epoch = 1694643287, nanos_since_epoch = 944767000 }, "a5918f742d4589d2f5a91daf232eb03a2a0972a367ec0b016e9e8670e28c1b47"]

View File

@ -1,51 +0,0 @@
type Schema {
Integer(Int)
List(List<Schema>)
Constr(Int, Schema)
}
fn sum_constr(tag: Int, fields: Schema) -> Int {
tag + sum(fields)
}
fn sum(schema: Schema) -> Int {
when schema is {
Integer(i) -> i
List(xs) -> sum_list(xs)
Constr(tag, fields) -> sum_constr(tag, fields)
}
}
fn sum_list(list: List<Schema>) -> Int {
when list is {
[] -> 0
[x, ..xs] -> sum(x) + sum_list(xs)
}
}
test bar() {
sum(List([List([Integer(1), Integer(2)]), Integer(3), Integer(4)])) == 10
}
fn prod(schema: Schema) -> Int {
when schema is {
Integer(i) -> i
List(xs) -> prod_list(xs)
Constr(tag, fields) -> prod_constr(tag, fields)
}
}
fn prod_constr(tag: Int, fields: Schema) -> Int {
tag * prod(fields) + sum(fields)
}
fn prod_list(list: List<Schema>) -> Int {
when list is {
[] -> 1
[x, ..xs] -> prod(x) * prod_list(xs)
}
}
test sum_prod() {
prod(List([List([Integer(1), Integer(2)]), Integer(3), Integer(4)])) == 24
}

View File

@ -18,5 +18,8 @@ fn sum_list(list: List<Schema>) -> Int {
} }
test foo() { test foo() {
// False
// Can't enable the "real" test because it puts the UPLC evaluator in an infinite loop.
// -
sum(List([List([Integer(1), Integer(2)]), Integer(3), Integer(4)])) == 10 sum(List([List([Integer(1), Integer(2)]), Integer(3), Integer(4)])) == 10
} }

View File

@ -13,4 +13,4 @@ requirements = []
source = "github" source = "github"
[etags] [etags]
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1695677334, nanos_since_epoch = 523082000 }, "a5918f742d4589d2f5a91daf232eb03a2a0972a367ec0b016e9e8670e28c1b47"] "aiken-lang/stdlib@main" = [{ secs_since_epoch = 1694643372, nanos_since_epoch = 547906000 }, "a5918f742d4589d2f5a91daf232eb03a2a0972a367ec0b016e9e8670e28c1b47"]

View File

@ -13,4 +13,4 @@ requirements = []
source = "github" source = "github"
[etags] [etags]
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1695677333, nanos_since_epoch = 543959000 }, "a5918f742d4589d2f5a91daf232eb03a2a0972a367ec0b016e9e8670e28c1b47"] "aiken-lang/stdlib@main" = [{ secs_since_epoch = 1694643361, nanos_since_epoch = 785075000 }, "a5918f742d4589d2f5a91daf232eb03a2a0972a367ec0b016e9e8670e28c1b47"]

View File

@ -13,4 +13,4 @@ requirements = []
source = "github" source = "github"
[etags] [etags]
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1695677312, nanos_since_epoch = 307959000 }, "a5918f742d4589d2f5a91daf232eb03a2a0972a367ec0b016e9e8670e28c1b47"] "aiken-lang/stdlib@main" = [{ secs_since_epoch = 1694643229, nanos_since_epoch = 170407000 }, "a5918f742d4589d2f5a91daf232eb03a2a0972a367ec0b016e9e8670e28c1b47"]

View File

@ -13,4 +13,4 @@ requirements = []
source = "github" source = "github"
[etags] [etags]
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1695677326, nanos_since_epoch = 227348000 }, "a5918f742d4589d2f5a91daf232eb03a2a0972a367ec0b016e9e8670e28c1b47"] "aiken-lang/stdlib@main" = [{ secs_since_epoch = 1694643319, nanos_since_epoch = 726312000 }, "a5918f742d4589d2f5a91daf232eb03a2a0972a367ec0b016e9e8670e28c1b47"]

View File

@ -13,4 +13,4 @@ requirements = []
source = "github" source = "github"
[etags] [etags]
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1695677324, nanos_since_epoch = 471629000 }, "a5918f742d4589d2f5a91daf232eb03a2a0972a367ec0b016e9e8670e28c1b47"] "aiken-lang/stdlib@main" = [{ secs_since_epoch = 1694643307, nanos_since_epoch = 332036000 }, "a5918f742d4589d2f5a91daf232eb03a2a0972a367ec0b016e9e8670e28c1b47"]

View File

@ -13,4 +13,4 @@ requirements = []
source = "github" source = "github"
[etags] [etags]
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1695677311, nanos_since_epoch = 397711000 }, "a5918f742d4589d2f5a91daf232eb03a2a0972a367ec0b016e9e8670e28c1b47"] "aiken-lang/stdlib@main" = [{ secs_since_epoch = 1694643201, nanos_since_epoch = 622092000 }, "a5918f742d4589d2f5a91daf232eb03a2a0972a367ec0b016e9e8670e28c1b47"]

View File

@ -13,4 +13,4 @@ requirements = []
source = "github" source = "github"
[etags] [etags]
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1695677312, nanos_since_epoch = 988170000 }, "a5918f742d4589d2f5a91daf232eb03a2a0972a367ec0b016e9e8670e28c1b47"] "aiken-lang/stdlib@main" = [{ secs_since_epoch = 1694643247, nanos_since_epoch = 792939000 }, "a5918f742d4589d2f5a91daf232eb03a2a0972a367ec0b016e9e8670e28c1b47"]

View File

@ -13,4 +13,4 @@ requirements = []
source = "github" source = "github"
[etags] [etags]
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1695677311, nanos_since_epoch = 397762000 }, "a5918f742d4589d2f5a91daf232eb03a2a0972a367ec0b016e9e8670e28c1b47"] "aiken-lang/stdlib@main" = [{ secs_since_epoch = 1694643213, nanos_since_epoch = 504322000 }, "a5918f742d4589d2f5a91daf232eb03a2a0972a367ec0b016e9e8670e28c1b47"]

View File

@ -13,4 +13,4 @@ requirements = []
source = "github" source = "github"
[etags] [etags]
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1695677311, nanos_since_epoch = 398456000 }, "a5918f742d4589d2f5a91daf232eb03a2a0972a367ec0b016e9e8670e28c1b47"] "aiken-lang/stdlib@main" = [{ secs_since_epoch = 1694643219, nanos_since_epoch = 802956000 }, "a5918f742d4589d2f5a91daf232eb03a2a0972a367ec0b016e9e8670e28c1b47"]

View File

@ -13,4 +13,4 @@ requirements = []
source = "github" source = "github"
[etags] [etags]
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1695677312, nanos_since_epoch = 281240000 }, "a5918f742d4589d2f5a91daf232eb03a2a0972a367ec0b016e9e8670e28c1b47"] "aiken-lang/stdlib@main" = [{ secs_since_epoch = 1694643240, nanos_since_epoch = 921679000 }, "a5918f742d4589d2f5a91daf232eb03a2a0972a367ec0b016e9e8670e28c1b47"]

View File

@ -13,4 +13,4 @@ requirements = []
source = "github" source = "github"
[etags] [etags]
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1695677327, nanos_since_epoch = 522535000 }, "a5918f742d4589d2f5a91daf232eb03a2a0972a367ec0b016e9e8670e28c1b47"] "aiken-lang/stdlib@main" = [{ secs_since_epoch = 1694643325, nanos_since_epoch = 921435000 }, "a5918f742d4589d2f5a91daf232eb03a2a0972a367ec0b016e9e8670e28c1b47"]

View File

@ -13,4 +13,4 @@ requirements = []
source = "github" source = "github"
[etags] [etags]
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1695677324, nanos_since_epoch = 427027000 }, "a5918f742d4589d2f5a91daf232eb03a2a0972a367ec0b016e9e8670e28c1b47"] "aiken-lang/stdlib@main" = [{ secs_since_epoch = 1694643301, nanos_since_epoch = 304619000 }, "a5918f742d4589d2f5a91daf232eb03a2a0972a367ec0b016e9e8670e28c1b47"]

View File

@ -13,4 +13,4 @@ requirements = []
source = "github" source = "github"
[etags] [etags]
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1695677327, nanos_since_epoch = 474167000 }, "a5918f742d4589d2f5a91daf232eb03a2a0972a367ec0b016e9e8670e28c1b47"] "aiken-lang/stdlib@main" = [{ secs_since_epoch = 1694643338, nanos_since_epoch = 422865000 }, "a5918f742d4589d2f5a91daf232eb03a2a0972a367ec0b016e9e8670e28c1b47"]

View File

@ -1,16 +0,0 @@
# This file was generated by Aiken
# You typically do not need to edit this file
[[requirements]]
name = "aiken-lang/stdlib"
version = "main"
source = "github"
[[packages]]
name = "aiken-lang/stdlib"
version = "main"
requirements = []
source = "github"
[etags]
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1695677322, nanos_since_epoch = 534350000 }, "a5918f742d4589d2f5a91daf232eb03a2a0972a367ec0b016e9e8670e28c1b47"]

View File

@ -1,8 +0,0 @@
name = "aiken-lang/acceptance_test_089"
version = "0.0.0"
description = ""
[[dependencies]]
name = 'aiken-lang/stdlib'
version = 'main'
source = 'github'

View File

@ -1,40 +0,0 @@
use aiken/cbor
use aiken/transaction.{Datum, InlineDatum, NoDatum, Output}
use aiken/transaction/credential.{Address, VerificationKeyCredential}
use aiken/transaction/value.{from_lovelace}
type SmallOracleState {
Thing(Int)
}
fn create_output(
payment_key: ByteArray,
_thing,
value: Int,
other_thing,
datum: Datum,
script_ref: Option<ByteArray>,
) -> Output {
let x =
Output {
address: Address {
payment_credential: VerificationKeyCredential(payment_key),
stake_credential: None,
},
value: from_lovelace(value),
datum,
reference_script: script_ref,
}
x
}
fn get_inline_datum(output: Output) -> Data {
expect InlineDatum(datum) = output.datum
datum
}
test get_inline_datum_test() {
let output = create_output(#"00", True, 10, None, NoDatum, None)
expect small: SmallOracleState = get_inline_datum(output)
True
}

View File

@ -32,8 +32,6 @@
cargoLock.lockFile = ./Cargo.lock; cargoLock.lockFile = ./Cargo.lock;
GIT_COMMIT_HASH_SHORT = self.rev or "dirty"; # or self.dirtyRev;
postInstall = '' postInstall = ''
mkdir -p $out/share/zsh/site-functions mkdir -p $out/share/zsh/site-functions
$out/bin/aiken completion zsh > $out/share/zsh/site-functions/_aiken $out/bin/aiken completion zsh > $out/share/zsh/site-functions/_aiken