Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flake.lock: Update #1733

Merged
merged 3 commits into from
May 18, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .markdownlint.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"tables": false
},
"MD024": {
"allow_different_nesting": true
"siblings_only": true
}
}
3 changes: 2 additions & 1 deletion core/benches/arrays/fold.ncl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
let letter | Number -> std.string.Character = fun n =>
let letter | Number -> std.string.Character
= fun n =>
let letters = std.string.characters "abcdefghijklmnopqrstuvwxyz" in
std.array.at (n % 26) letters
in
Expand Down
3 changes: 2 additions & 1 deletion core/benches/arrays/generate.ncl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ let g = fun n => n * 2 + 5 in
run = fun n => generate n g,
},
checked = {
generate_with_contract | forall a. Number -> (Number -> a) -> Array a = fun n g =>
generate_with_contract | forall a. Number -> (Number -> a) -> Array a
= fun n g =>
if n == 0 then
[]
else
Expand Down
3 changes: 1 addition & 2 deletions core/stdlib/std.ncl
Original file line number Diff line number Diff line change
Expand Up @@ -919,8 +919,7 @@
|> blame,

# Outside of lazy data structures, we just use (==)
_ =>
fun ctr_label value =>
_ => fun ctr_label value =>
value
|> check_typeof_eq ctr_label
|> from_predicate ((==) constant) ctr_label,
Expand Down
6 changes: 1 addition & 5 deletions doc/manual/merging.md
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,6 @@ argument), we do get a contract violation error:
{ foo | FooContract }
& { foo.required_field1 = "here" }
in
intermediate
& { foo.required_field2 = "here" }
|> std.deep_seq intermediate
Expand All @@ -624,10 +623,7 @@ error: missing definition for `required_field2`
8 │ & { foo.required_field1 = "here" }
│ ------------------------ in this record
┌─ <stdlib/std.ncl>:3255:18
3255 │ = fun x y => %deep_seq% x y,
│ ------------ accessed here
[...]
```

#### Example
Expand Down
6 changes: 4 additions & 2 deletions examples/arrays/arrays.ncl
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@
# Example array functions. This code is illustrative: prefer using the array
# stdlib functions `std.array.map` and `std.array.fold_right` instead.
let my_array_lib = {
map : forall a b. (a -> b) -> Array a -> Array b = fun f arr =>
map : forall a b. (a -> b) -> Array a -> Array b
= fun f arr =>
if arr == [] then
[]
else
let head = std.array.first arr in
let tail = std.array.drop_first arr in
[f head] @ map f tail,

fold : forall a b. (a -> b -> b) -> b -> Array a -> b = fun f first arr =>
fold : forall a b. (a -> b -> b) -> b -> Array a -> b
= fun f first arr =>
if arr == [] then
first
else
Expand Down
Loading
Loading