diff --git a/examples/acceptance_tests/001/lib/tests.ak b/examples/acceptance_tests/001/lib/tests.ak
index 8a609f5c..75355cc8 100644
--- a/examples/acceptance_tests/001/lib/tests.ak
+++ b/examples/acceptance_tests/001/lib/tests.ak
@@ -1,9 +1,7 @@
pub fn length(xs: List) -> Int {
when xs is {
- [] ->
- 0
- [_, ..rest] ->
- 1 + length(rest)
+ [] -> 0
+ [_, ..rest] -> 1 + length(rest)
}
}
diff --git a/examples/acceptance_tests/003/lib/tests.ak b/examples/acceptance_tests/003/lib/tests.ak
index 99e7c436..49b48533 100644
--- a/examples/acceptance_tests/003/lib/tests.ak
+++ b/examples/acceptance_tests/003/lib/tests.ak
@@ -1,9 +1,7 @@
pub fn foldr(xs: List, f: fn(a, b) -> b, zero: b) -> b {
when xs is {
- [] ->
- zero
- [x, ..rest] ->
- f(x, foldr(rest, f, zero))
+ [] -> zero
+ [x, ..rest] -> f(x, foldr(rest, f, zero))
}
}
diff --git a/examples/acceptance_tests/004/lib/tests.ak b/examples/acceptance_tests/004/lib/tests.ak
index c7478e73..169f2b3d 100644
--- a/examples/acceptance_tests/004/lib/tests.ak
+++ b/examples/acceptance_tests/004/lib/tests.ak
@@ -1,9 +1,7 @@
pub fn foldr(xs: List, f: fn(a, b) -> b, zero: b) -> b {
when xs is {
- [] ->
- zero
- [x, ..rest] ->
- f(x, foldr(rest, f, zero))
+ [] -> zero
+ [x, ..rest] -> f(x, foldr(rest, f, zero))
}
}
diff --git a/examples/acceptance_tests/006/lib/tests.ak b/examples/acceptance_tests/006/lib/tests.ak
index 1241a51b..02217809 100644
--- a/examples/acceptance_tests/006/lib/tests.ak
+++ b/examples/acceptance_tests/006/lib/tests.ak
@@ -10,4 +10,3 @@ test bar() {
False
}
}
-
diff --git a/examples/acceptance_tests/007/lib/tests.ak b/examples/acceptance_tests/007/lib/tests.ak
index 49cad116..29a47b70 100644
--- a/examples/acceptance_tests/007/lib/tests.ak
+++ b/examples/acceptance_tests/007/lib/tests.ak
@@ -9,7 +9,8 @@ pub fn unzip(xs: List<(a, b)>) -> (List, List) {
}
test unzip1() {
- let x = [(3, #"55"), (4, #"7799")]
+ let x =
+ [(3, #"55"), (4, #"7799")]
unzip(x) == ([3, 4], [#"55", #"7799"])
}
diff --git a/examples/acceptance_tests/010/lib/tests.ak b/examples/acceptance_tests/010/lib/tests.ak
index b4646306..31260b9b 100644
--- a/examples/acceptance_tests/010/lib/tests.ak
+++ b/examples/acceptance_tests/010/lib/tests.ak
@@ -1,9 +1,7 @@
pub fn map(opt: Option, f: fn(a) -> b) -> Option {
when opt is {
- None ->
- None
- Some(a) ->
- Some(f(a))
+ None -> None
+ Some(a) -> Some(f(a))
}
}
diff --git a/examples/acceptance_tests/013/lib/tests.ak b/examples/acceptance_tests/013/lib/tests.ak
index df9a87a3..311de32f 100644
--- a/examples/acceptance_tests/013/lib/tests.ak
+++ b/examples/acceptance_tests/013/lib/tests.ak
@@ -1,10 +1,8 @@
pub fn unzip(xs: List<(a, b)>) -> (List, List) {
when xs is {
- [] ->
- ([], [])
+ [] -> ([], [])
[(a, b), ..rest] -> {
- let (a_tail, b_tail) =
- unzip(rest)
+ let (a_tail, b_tail) = unzip(rest)
([a, ..a_tail], [b, ..b_tail])
}
}
diff --git a/examples/acceptance_tests/016/lib/tests.ak b/examples/acceptance_tests/016/lib/tests.ak
index 53230255..72462cea 100644
--- a/examples/acceptance_tests/016/lib/tests.ak
+++ b/examples/acceptance_tests/016/lib/tests.ak
@@ -13,7 +13,6 @@ pub fn drop(bytes: ByteArray, n: Int) -> ByteArray {
}
test drop_1() {
- let x =
- #"01020304050607"
+ let x = #"01020304050607"
drop(x, 2) == #"0304050607"
}
diff --git a/examples/acceptance_tests/018/lib/tests.ak b/examples/acceptance_tests/018/lib/tests.ak
index ccadaf0e..335b0770 100644
--- a/examples/acceptance_tests/018/lib/tests.ak
+++ b/examples/acceptance_tests/018/lib/tests.ak
@@ -1,9 +1,7 @@
pub fn or_else(opt: Option, default: a) -> a {
when opt is {
- None ->
- default
- Some(a) ->
- a
+ None -> default
+ Some(a) -> a
}
}
diff --git a/examples/acceptance_tests/019/lib/tests.ak b/examples/acceptance_tests/019/lib/tests.ak
index c6cb4dac..7b536da4 100644
--- a/examples/acceptance_tests/019/lib/tests.ak
+++ b/examples/acceptance_tests/019/lib/tests.ak
@@ -1,9 +1,7 @@
pub fn map(opt: Option, f: fn(a) -> result) -> Option {
when opt is {
- None ->
- None
- Some(a) ->
- Some(f(a))
+ None -> None
+ Some(a) -> Some(f(a))
}
}
diff --git a/examples/acceptance_tests/020/lib/tests.ak b/examples/acceptance_tests/020/lib/tests.ak
index 70b12579..a199733d 100644
--- a/examples/acceptance_tests/020/lib/tests.ak
+++ b/examples/acceptance_tests/020/lib/tests.ak
@@ -1,9 +1,7 @@
pub fn map(opt: Option, f: fn(a) -> result) -> Option {
when opt is {
- None ->
- None
- Some(a) ->
- Some(f(a))
+ None -> None
+ Some(a) -> Some(f(a))
}
}
diff --git a/examples/acceptance_tests/022/lib/tests.ak b/examples/acceptance_tests/022/lib/tests.ak
index d3514aa5..87cf5f7c 100644
--- a/examples/acceptance_tests/022/lib/tests.ak
+++ b/examples/acceptance_tests/022/lib/tests.ak
@@ -1,9 +1,7 @@
pub fn foldr(xs: List, f: fn(a, b) -> b, zero: b) -> b {
when xs is {
- [] ->
- zero
- [x, ..rest] ->
- f(x, foldr(rest, f, zero))
+ [] -> zero
+ [x, ..rest] -> f(x, foldr(rest, f, zero))
}
}
@@ -12,8 +10,7 @@ pub fn filter_map(xs: List, f: fn(a) -> Option) -> List {
xs,
fn(x, ys) {
when f(x) is {
- None ->
- ys
+ None -> ys
Some(y) ->
[y, ..ys]
}
diff --git a/examples/acceptance_tests/024/lib/tests.ak b/examples/acceptance_tests/024/lib/tests.ak
index 3f036032..497ed5cc 100644
--- a/examples/acceptance_tests/024/lib/tests.ak
+++ b/examples/acceptance_tests/024/lib/tests.ak
@@ -4,14 +4,11 @@ pub fn map2(
f: fn(a, b) -> result,
) -> Option {
when opt_a is {
- None ->
- None
+ None -> None
Some(a) ->
when opt_b is {
- None ->
- None
- Some(b) ->
- Some(f(a, b))
+ None -> None
+ Some(b) -> Some(f(a, b))
}
}
}
diff --git a/examples/acceptance_tests/026/lib/tests.ak b/examples/acceptance_tests/026/lib/tests.ak
index 1d8a27ef..7669a51c 100644
--- a/examples/acceptance_tests/026/lib/tests.ak
+++ b/examples/acceptance_tests/026/lib/tests.ak
@@ -1,9 +1,7 @@
pub fn foldr(xs: List, f: fn(a, b) -> b, zero: b) -> b {
when xs is {
- [] ->
- zero
- [x, ..rest] ->
- f(x, foldr(rest, f, zero))
+ [] -> zero
+ [x, ..rest] -> f(x, foldr(rest, f, zero))
}
}
@@ -15,8 +13,7 @@ pub fn flat_map(xs: List, f: fn(a) -> List) -> List {
when xs is {
[] ->
[]
- [x, ..rest] ->
- concat(f(x), flat_map(rest, f))
+ [x, ..rest] -> concat(f(x), flat_map(rest, f))
}
}
diff --git a/examples/acceptance_tests/029/lib/tests.ak b/examples/acceptance_tests/029/lib/tests.ak
index 733be4cf..4751ca22 100644
--- a/examples/acceptance_tests/029/lib/tests.ak
+++ b/examples/acceptance_tests/029/lib/tests.ak
@@ -14,8 +14,7 @@ fn do_from_list(xs: List<(key, value)>) -> List<(key, value)> {
when xs is {
[] ->
[]
- [(k, v), ..rest] ->
- do_insert(do_from_list(rest), k, v)
+ [(k, v), ..rest] -> do_insert(do_from_list(rest), k, v)
}
}
@@ -52,10 +51,8 @@ fn do_union(
right: List<(key, value)>,
) -> List<(key, value)> {
when left is {
- [] ->
- right
- [(k, v), ..rest] ->
- do_union(rest, do_insert(right, k, v))
+ [] -> right
+ [(k, v), ..rest] -> do_union(rest, do_insert(right, k, v))
}
}
diff --git a/examples/acceptance_tests/033/lib/tests.ak b/examples/acceptance_tests/033/lib/tests.ak
index b16f014f..cca7041d 100644
--- a/examples/acceptance_tests/033/lib/tests.ak
+++ b/examples/acceptance_tests/033/lib/tests.ak
@@ -1,5 +1,4 @@
test tuple_1() {
- let coordinates =
- (14, 42)
+ let coordinates = (14, 42)
coordinates.1st == 14 && coordinates.2nd == 42
}
diff --git a/examples/acceptance_tests/034/lib/tests.ak b/examples/acceptance_tests/034/lib/tests.ak
index 2a3b0674..110d7f90 100644
--- a/examples/acceptance_tests/034/lib/tests.ak
+++ b/examples/acceptance_tests/034/lib/tests.ak
@@ -1,9 +1,7 @@
pub fn foldr(self: List, with: fn(a, b) -> b, zero: b) -> b {
when self is {
- [] ->
- zero
- [x, ..xs] ->
- with(x, foldr(xs, with, zero))
+ [] -> zero
+ [x, ..xs] -> with(x, foldr(xs, with, zero))
}
}
diff --git a/examples/acceptance_tests/035/lib/aiken/dict.ak b/examples/acceptance_tests/035/lib/aiken/dict.ak
index a333c240..29772053 100644
--- a/examples/acceptance_tests/035/lib/aiken/dict.ak
+++ b/examples/acceptance_tests/035/lib/aiken/dict.ak
@@ -37,8 +37,7 @@ fn do_union_with(
with: fn(ByteArray, value, value) -> Option,
) -> List<(ByteArray, value)> {
when left is {
- [] ->
- right
+ [] -> right
[(k, v), ..rest] ->
do_union_with(rest, do_insert_with(right, k, v, with), with)
}
@@ -58,8 +57,7 @@ fn do_insert_with(
when with(k, v, v2) is {
Some(combined) ->
[(k, combined), ..rest]
- None ->
- rest
+ None -> rest
}
} else {
[(k2, v2), ..do_insert_with(rest, k, v, with)]
diff --git a/examples/acceptance_tests/035/lib/tests.ak b/examples/acceptance_tests/035/lib/tests.ak
index f9865e78..18ecaced 100644
--- a/examples/acceptance_tests/035/lib/tests.ak
+++ b/examples/acceptance_tests/035/lib/tests.ak
@@ -35,8 +35,7 @@ pub fn add(left v0: Value, right v1: Value) -> Value {
a0,
a1,
fn(_, q0, q1) {
- let q =
- q0 + q1
+ let q = q0 + q1
if q == 0 {
None
} else {
@@ -46,19 +45,15 @@ pub fn add(left v0: Value, right v1: Value) -> Value {
)
when dict.toList(asset) is {
- [] ->
- None
- _ ->
- Some(asset)
+ [] -> None
+ _ -> Some(asset)
}
},
)
}
test add_1() {
- let v1 =
- from_lovelace(1)
- let v2 =
- from_lovelace(-1)
+ let v1 = from_lovelace(1)
+ let v2 = from_lovelace(-1)
add(v1, v2) == dict.new()
}
diff --git a/examples/acceptance_tests/036/aiken.lock b/examples/acceptance_tests/036/aiken.lock
index 956b09e8..90c74e36 100644
--- a/examples/acceptance_tests/036/aiken.lock
+++ b/examples/acceptance_tests/036/aiken.lock
@@ -13,4 +13,4 @@ requirements = []
source = "github"
[etags]
-"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1705181051, nanos_since_epoch = 270212000 }, "cf946239d3dd481ed41f20e56bf24910b5229ea35aa171a708edc2a47fc20a7b"]
+"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1705743641, nanos_since_epoch = 8357000 }, "cf946239d3dd481ed41f20e56bf24910b5229ea35aa171a708edc2a47fc20a7b"]
diff --git a/examples/acceptance_tests/036/plutus.json b/examples/acceptance_tests/036/plutus.json
index 5607dfbd..9661a37c 100644
--- a/examples/acceptance_tests/036/plutus.json
+++ b/examples/acceptance_tests/036/plutus.json
@@ -5,7 +5,7 @@
"plutusVersion": "v2",
"compiler": {
"name": "Aiken",
- "version": "v1.0.21-alpha+0161cf6"
+ "version": "v1.0.21-alpha+bf96c3a"
}
},
"validators": [
diff --git a/examples/acceptance_tests/036/validators/spend.ak b/examples/acceptance_tests/036/validators/spend.ak
index 3613b3e0..a75c1c17 100644
--- a/examples/acceptance_tests/036/validators/spend.ak
+++ b/examples/acceptance_tests/036/validators/spend.ak
@@ -3,8 +3,7 @@ use aiken/list
use aiken/transaction.{Output, OutputReference, ScriptContext}
use aiken/transaction/value.{PolicyId}
-const my_policy_id: PolicyId =
- #"0000000000"
+const my_policy_id: PolicyId = #"0000000000"
pub fn has_policy_id(self: Output, policy_id: PolicyId) -> Bool {
self.value
@@ -28,10 +27,8 @@ validator(output_reference: OutputReference) {
fn(input) { input.output_reference == output_reference },
)
is {
- Some(_) ->
- True
- None ->
- False
+ Some(_) -> True
+ None -> False
}
}
}
diff --git a/examples/acceptance_tests/038/lib/tests.ak b/examples/acceptance_tests/038/lib/tests.ak
index 6bcaab45..c6fc7067 100644
--- a/examples/acceptance_tests/038/lib/tests.ak
+++ b/examples/acceptance_tests/038/lib/tests.ak
@@ -1,9 +1,7 @@
pub fn and_f(self: List) -> Bool {
when self is {
- [] ->
- True
- [x, ..xs] ->
- x && and_f(xs)
+ [] -> True
+ [x, ..xs] -> x && and_f(xs)
}
}
@@ -13,10 +11,8 @@ test and_f_1() {
pub fn or_f(self: List) -> Bool {
when self is {
- [] ->
- False
- [x, ..xs] ->
- x || or_f(xs)
+ [] -> False
+ [x, ..xs] -> x || or_f(xs)
}
}
diff --git a/examples/acceptance_tests/044/lib/tests.ak b/examples/acceptance_tests/044/lib/tests.ak
index dcf8a056..0fc18747 100644
--- a/examples/acceptance_tests/044/lib/tests.ak
+++ b/examples/acceptance_tests/044/lib/tests.ak
@@ -1,23 +1,17 @@
test foo_1() {
- let a =
- False
+ let a = False
when a is {
- True ->
- False
- False ->
- True
+ True -> False
+ False -> True
}
}
test foo_2() {
- let a =
- False
+ let a = False
let b =
when a is {
- True ->
- 14
- False ->
- 42
+ True -> 14
+ False -> 42
}
b == 42
}
diff --git a/examples/acceptance_tests/045/lib/tests.ak b/examples/acceptance_tests/045/lib/tests.ak
index f06e701e..dff735e9 100644
--- a/examples/acceptance_tests/045/lib/tests.ak
+++ b/examples/acceptance_tests/045/lib/tests.ak
@@ -11,7 +11,6 @@ fn fibonnaci(n) {
test foo() {
let right =
fn() { fibonnaci(15) == 610 }
- let left =
- False
+ let left = False
left || right()
}
diff --git a/examples/acceptance_tests/046/lib/tests.ak b/examples/acceptance_tests/046/lib/tests.ak
index 2f200144..4b43c42c 100644
--- a/examples/acceptance_tests/046/lib/tests.ak
+++ b/examples/acceptance_tests/046/lib/tests.ak
@@ -2,13 +2,9 @@ test sort_by_1() {
let xs =
[[4, 3, 2, 1], [2, 3, 4, 5]]
when xs is {
- [[], ys] ->
- False
- [xs, []] ->
- False
- [[x, ..xs2], [y, ..ys2]] ->
- True
- _ ->
- False
+ [[], ys] -> False
+ [xs, []] -> False
+ [[x, ..xs2], [y, ..ys2]] -> True
+ _ -> False
}
}
diff --git a/examples/acceptance_tests/047/plutus.json b/examples/acceptance_tests/047/plutus.json
index 5727174d..3e25c40b 100644
--- a/examples/acceptance_tests/047/plutus.json
+++ b/examples/acceptance_tests/047/plutus.json
@@ -5,7 +5,7 @@
"plutusVersion": "v2",
"compiler": {
"name": "Aiken",
- "version": "v1.0.21-alpha+0161cf6"
+ "version": "v1.0.21-alpha+bf96c3a"
}
},
"validators": [
diff --git a/examples/acceptance_tests/048/lib/tests.ak b/examples/acceptance_tests/048/lib/tests.ak
index a0ce78e5..680d5e29 100644
--- a/examples/acceptance_tests/048/lib/tests.ak
+++ b/examples/acceptance_tests/048/lib/tests.ak
@@ -1,48 +1,34 @@
test foo_1() {
- let a =
- False
+ let a = False
when a is {
- a if a ->
- False
- _ ->
- True
+ a if a -> False
+ _ -> True
}
}
test foo_2() {
- let point =
- (14, 42)
+ let point = (14, 42)
when point is {
- (x, _) if x > 100 ->
- False
- (x, _) if x > 10 ->
- True
- _ ->
- False
+ (x, _) if x > 100 -> False
+ (x, _) if x > 10 -> True
+ _ -> False
}
}
test foo_3() {
- let point =
- (14, 42)
+ let point = (14, 42)
when point is {
- (x, y) if x == 14 && y <= 100 ->
- True
- _ ->
- False
+ (x, y) if x == 14 && y <= 100 -> True
+ _ -> False
}
}
test foo_4() {
- let a =
- False
- let point =
- (14, 42)
+ let a = False
+ let point = (14, 42)
when point is {
- (x, y) if !a ->
- x + y == 56
- _ ->
- False
+ (x, y) if !a -> x + y == 56
+ _ -> False
}
}
@@ -55,12 +41,9 @@ type Seasons {
fn is_cold(season, hour) {
when season is {
- Winter | Fall ->
- True
- _ if hour >= 18 ->
- True
- _ ->
- False
+ Winter | Fall -> True
+ _ if hour >= 18 -> True
+ _ -> False
}
}
@@ -70,8 +53,7 @@ test foo_5() {
fn when_tuple(a: (Int, Int)) -> Int {
when a is {
- (a, _b) ->
- a
+ (a, _b) -> a
}
}
diff --git a/examples/acceptance_tests/049/lib/tests.ak b/examples/acceptance_tests/049/lib/tests.ak
index 98b5e7f1..7cef193d 100644
--- a/examples/acceptance_tests/049/lib/tests.ak
+++ b/examples/acceptance_tests/049/lib/tests.ak
@@ -1,7 +1,6 @@
pub fn when_tuple(a: (Int, Int)) -> Int {
when a is {
- (a, b) ->
- a
+ (a, b) -> a
}
}
diff --git a/examples/acceptance_tests/050/lib/tests.ak b/examples/acceptance_tests/050/lib/tests.ak
index 6873715f..dca9b864 100644
--- a/examples/acceptance_tests/050/lib/tests.ak
+++ b/examples/acceptance_tests/050/lib/tests.ak
@@ -5,55 +5,46 @@ pub type Thing {
}
test let_1() {
- let x: Data =
- 1
+ let x: Data = 1
x == builtin.i_data(1)
}
test let_2() {
- let x: Data =
- 1
+ let x: Data = 1
- expect y: Int =
- x
+ expect y: Int = x
y == 1
}
test assert_1() {
- expect thing: Thing =
- builtin.constr_data(0, [builtin.i_data(1)])
+ expect thing: Thing = builtin.constr_data(0, [builtin.i_data(1)])
thing.wow == 1
}
fn cast_to_thing(x: Data) -> Thing {
- expect x: Thing =
- x
+ expect x: Thing = x
x
}
test assert_2() {
- let thing =
- Thing { wow: 1 }
+ let thing = Thing { wow: 1 }
- let still_thing =
- cast_to_thing(thing)
+ let still_thing = cast_to_thing(thing)
still_thing.wow == 1
}
test tuple_1() {
- let thing =
- (#"aa", #"bb", #"cc")
+ let thing = (#"aa", #"bb", #"cc")
thing.1st == #"aa"
}
test pair_1() {
- let thing =
- (#"aa", #"bb")
+ let thing = (#"aa", #"bb")
thing.1st == #"aa"
}
// should not typecheck
diff --git a/examples/acceptance_tests/052/lib/tests.ak b/examples/acceptance_tests/052/lib/tests.ak
index c09e4fc7..a7de4aa8 100644
--- a/examples/acceptance_tests/052/lib/tests.ak
+++ b/examples/acceptance_tests/052/lib/tests.ak
@@ -3,20 +3,16 @@ type TransactionId {
}
test pattern_match_let() {
- let x =
- TransactionId { inner: #"0000" }
- let TransactionId(y) =
- x
+ let x = TransactionId { inner: #"0000" }
+ let TransactionId(y) = x
y == #"0000"
}
test pattern_match_when() {
- let x =
- TransactionId { inner: #"0000" }
+ let x = TransactionId { inner: #"0000" }
let y =
when x is {
- TransactionId(y) ->
- y
+ TransactionId(y) -> y
}
y == #"0000"
}
diff --git a/examples/acceptance_tests/053/lib/tests.ak b/examples/acceptance_tests/053/lib/tests.ak
index bb36f030..e4f25625 100644
--- a/examples/acceptance_tests/053/lib/tests.ak
+++ b/examples/acceptance_tests/053/lib/tests.ak
@@ -5,15 +5,12 @@ pub type LinkedList {
pub fn size(t: LinkedList) -> Int {
when t is {
- Empty ->
- 0
- Node(_, tail) ->
- 1 + size(tail)
+ Empty -> 0
+ Node(_, tail) -> 1 + size(tail)
}
}
test foo() {
- let xs =
- Node(0, Node(1, Node(2, Empty)))
+ let xs = Node(0, Node(1, Node(2, Empty)))
size(xs) == 3
}
diff --git a/examples/acceptance_tests/054/aiken.lock b/examples/acceptance_tests/054/aiken.lock
index b9cfdf6f..3c44e5ab 100644
--- a/examples/acceptance_tests/054/aiken.lock
+++ b/examples/acceptance_tests/054/aiken.lock
@@ -13,4 +13,4 @@ requirements = []
source = "github"
[etags]
-"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1705181048, nanos_since_epoch = 152219000 }, "cf946239d3dd481ed41f20e56bf24910b5229ea35aa171a708edc2a47fc20a7b"]
+"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1705743640, nanos_since_epoch = 944875000 }, "cf946239d3dd481ed41f20e56bf24910b5229ea35aa171a708edc2a47fc20a7b"]
diff --git a/examples/acceptance_tests/054/lib/tests.ak b/examples/acceptance_tests/054/lib/tests.ak
index cb196467..59ae8fe7 100644
--- a/examples/acceptance_tests/054/lib/tests.ak
+++ b/examples/acceptance_tests/054/lib/tests.ak
@@ -1,7 +1,6 @@
use aiken/transaction/value
test test_quantity_of_1() {
- let x =
- value.from_asset(#"000000", #"000020e05363726970744f776e6572", -1)
+ let x = value.from_asset(#"000000", #"000020e05363726970744f776e6572", -1)
value.quantity_of(x, #"000000", #"000020e05363726970744f776e6572") < 0
}
diff --git a/examples/acceptance_tests/055/aiken.lock b/examples/acceptance_tests/055/aiken.lock
index 3f0c2cab..281ab120 100644
--- a/examples/acceptance_tests/055/aiken.lock
+++ b/examples/acceptance_tests/055/aiken.lock
@@ -13,4 +13,4 @@ requirements = []
source = "github"
[etags]
-"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1705181051, nanos_since_epoch = 995566000 }, "cf946239d3dd481ed41f20e56bf24910b5229ea35aa171a708edc2a47fc20a7b"]
+"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1705743642, nanos_since_epoch = 21373000 }, "cf946239d3dd481ed41f20e56bf24910b5229ea35aa171a708edc2a47fc20a7b"]
diff --git a/examples/acceptance_tests/055/lib/tests.ak b/examples/acceptance_tests/055/lib/tests.ak
index 1a4f5d85..8b906a5e 100644
--- a/examples/acceptance_tests/055/lib/tests.ak
+++ b/examples/acceptance_tests/055/lib/tests.ak
@@ -1,7 +1,7 @@
use aiken/bytearray
use aiken/dict
use aiken/hash.{Hash, Sha2_256, sha2_256}
-use aiken/interval.{between, intersection, is_empty, entirely_between}
+use aiken/interval.{between, entirely_between, intersection, is_empty}
use aiken/list
use aiken/transaction.{InlineDatum}
@@ -15,12 +15,9 @@ pub type MerkleTree {
pub fn root_hash(t: MerkleTree) -> Hash {
when t is {
- Empty ->
- #""
- Leaf { hash, .. } ->
- hash
- Node { hash, .. } ->
- hash
+ Empty -> #""
+ Leaf { hash, .. } -> hash
+ Node { hash, .. } -> hash
}
}
@@ -30,12 +27,9 @@ pub fn is_equal(a: MerkleTree, b: MerkleTree) -> Bool {
pub fn size(t: MerkleTree) -> Int {
when t is {
- Empty ->
- 0
- Leaf { .. } ->
- 1
- Node { left, right, .. } ->
- size(left) + size(right)
+ Empty -> 0
+ Leaf { .. } -> 1
+ Node { left, right, .. } -> size(left) + size(right)
}
}
@@ -49,13 +43,10 @@ pub fn from_list(items0: List) -> MerkleTree {
fn do_from_list(items: List, len: Int) -> MerkleTree {
when items is {
- [] ->
- Empty
- [value] ->
- Leaf { hash: sha2_256(value), value }
+ [] -> Empty
+ [value] -> Leaf { hash: sha2_256(value), value }
all -> {
- let cutoff: Int =
- len / 2
+ let cutoff: Int = len / 2
let left =
all
|> list.take(cutoff)
@@ -64,8 +55,7 @@ fn do_from_list(items: List, len: Int) -> MerkleTree {
all
|> list.drop(cutoff)
|> do_from_list(len - cutoff)
- let hash =
- combine_hash(root_hash(left), root_hash(right))
+ let hash = combine_hash(root_hash(left), root_hash(right))
Node { hash, left, right }
}
}
@@ -74,8 +64,7 @@ fn do_from_list(items: List, len: Int) -> MerkleTree {
test foo() {
let items =
[#"aa", #"bb", #"cc"]
- let mt =
- from_list(items)
+ let mt = from_list(items)
size(mt) == 3
}
@@ -84,19 +73,15 @@ test some_test1() {
}
test intersection_3() {
- let iv1 =
- between(0, 1)
- let iv2 =
- entirely_between(1, 2)
+ let iv1 = between(0, 1)
+ let iv2 = entirely_between(1, 2)
intersection(iv1, iv2)
|> is_empty
}
-const fooz =
- #"666f6f"
+const fooz = #"666f6f"
-const bar =
- #"626172"
+const bar = #"626172"
fn fixture_1() {
dict.new()
diff --git a/examples/acceptance_tests/056/lib/choice_a.ak b/examples/acceptance_tests/056/lib/choice_a.ak
index af67b514..91a0fb0d 100644
--- a/examples/acceptance_tests/056/lib/choice_a.ak
+++ b/examples/acceptance_tests/056/lib/choice_a.ak
@@ -1,12 +1,9 @@
// Could possibly be forbidden by the parser instead if we have no intent to support that.
pub fn choice(self: List