Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
101 changes: 24 additions & 77 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 3 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,9 @@ bumpalo = "3.16.0"
metrics = "0.21"
metrics-util = "0.15"

topiary-core = "0.4.0"
topiary-queries = { version = "=0.4.2", default-features = false, features = ["nickel"] }
# This version should agree with the topiary-query version: Nickel queries
# target a specific version of the Nickel grammar (though that dependency
# doesn't appear explicitly in `topiary-queries`'s Cargo.toml file). For now you
# might have to look at Topiary's commit messages, but in a near future, we'll
# try to make this data more accessible, e.g. in the query file
tree-sitter-nickel = "=0.2.0"
topiary-core = "0.5.1"
topiary-queries = { version = "0.5.1", default-features = false, features = ["nickel"] }
tree-sitter-nickel = "0.3.0"
tempfile = "3.5.0"

[profile.dev.package.lalrpop]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ expression: err
---
error: contract broken by the caller of `range`
invalid range
┌─ <stdlib/std.ncl>:769:9
┌─ <stdlib/std.ncl>:771:9
769 │ | std.contract.unstable.RangeFun Dyn
771 │ | std.contract.unstable.RangeFun Dyn
│ ---------------------------------- expected type
┌─ [INPUTS_PATH]/errors/array_range_reversed_indices.ncl:3:19
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ expression: err
---
error: contract broken by the caller of `range_step`
invalid range step
┌─ <stdlib/std.ncl>:744:9
┌─ <stdlib/std.ncl>:746:9
744 │ | std.contract.unstable.RangeFun (std.contract.unstable.RangeStep -> Dyn)
746 │ | std.contract.unstable.RangeFun (std.contract.unstable.RangeStep -> Dyn)
│ ----------------------------------------------------------------------- expected type
┌─ [INPUTS_PATH]/errors/array_range_step_negative_step.ncl:3:27
Expand Down
9 changes: 4 additions & 5 deletions core/benches/arrays/fold.ncl
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
let letter | Number -> std.string.Character
= fun n =>
let letters = std.string.characters "abcdefghijklmnopqrstuvwxyz" in
std.array.at (n % 26) letters
in
let letter | Number -> std.string.Character = fun n =>
let letters = std.string.characters "abcdefghijklmnopqrstuvwxyz" in
std.array.at (n % 26) letters
in

{
right = {
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
generate_with_contract
| forall a. Number -> (Number -> a) -> Array a
= fun n g =>
if n == 0 then
[]
Expand Down
9 changes: 5 additions & 4 deletions core/benches/arrays/primes.ncl
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ let range
[]
else
std.array.generate (fun x => x + start) (end - start)
in
in

let is_prime | doc "Returns true if the argument is a prime number."
let is_prime
| doc "Returns true if the argument is a prime number."
= fun x => x > 1 && std.array.all (fun d => x % d != 0) (range 2 (x - 1))
in
in

let Prime = std.contract.from_predicate is_prime in

Expand All @@ -34,7 +35,7 @@ let primes
loop (x + 1) (drop_multiples x xs)
in
loop 2 (range 2 max)
in
in

{
run = primes
Expand Down
5 changes: 3 additions & 2 deletions core/benches/arrays/random.ncl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
let mgc | doc "A multiplicative congruential pseudorandom number generator (MCG)."
let mgc
| doc "A multiplicative congruential pseudorandom number generator (MCG)."
= fun params x => (params.a * x + params.c) % params.m
in
in

# NOTE: These parameters are from "Table 7: Good multipliers for MCGs with m = 2^32"
# of the 2021 paper "Computationally Easy, Spectrally Good Multipliers for
Expand Down
11 changes: 5 additions & 6 deletions core/benches/arrays/sum.ncl
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
let rec sum | Array Number -> Number
= match {
[] => 0,
[x, ..xs] => x + sum xs,
}
in
let rec sum | Array Number -> Number = match {
[] => 0,
[x, ..xs] => x + sum xs,
}
in
{
run = fun n => std.array.generate (fun x => x + 1) n |> sum
}
13 changes: 6 additions & 7 deletions core/benches/mantis/jobs/mantis.ncl
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,12 @@ fun params =>
& {
reschedule = params.reschedule,

task.telegraf | Telegraf
= {
#infinte rec?
# #namespace = namespace,
name = "%{std.string.from_enum params.role}-${NOMAD_ALLOC_INDEX}",
prometheusPort = "metrics",
},
task.telegraf | Telegraf = {
#infinte rec?
# #namespace = namespace,
name = "%{std.string.from_enum params.role}-${NOMAD_ALLOC_INDEX}",
prometheusPort = "metrics",
},

# Do we really need this?
#task.mantis | tasks.#Mantis = {
Expand Down
Loading
Loading