Open
Description
Hey,
over the past few days with dhall oftentimes I encountered parsing errors with the error location very distant to the fix location. The debugging often gave me good few minutes of "find elmo" fun.
The location and description of parsing errors often seems in human terms unrelated to the error.
Below one such minimal unparsing example. Will add more. The parsing error occurs here at the m
letter in map =
with description: "expecting whitespace or }".
{ profiles.mk2_3by4 = {
setting_note_0vel_is_noteoff = True,
map =
let config =
({
intervals =
let mkIntervals = \({ pressed_channel : Integer, played_channel : Integer }) ->
lib.list-map Integer (lib.Pair lib.Note { intervals : List lib.Note})
(\(i : Integer) -> {
key = { note = lib.int-add +60 i, channel = pressed_channel },
val = { intervals = [ { note = i, channel = played_channel } ] }
})
(lib.range { from = -9, to = +4 })
in
[
(mkIntervals { pressed_channel = +0, played_channel = +0 }),
(mkIntervals { pressed_channel = +1, played_channel = +1 })
]
})
in lib.by_intervals config
},
}
The error "really" happens in the definition of mkIntervals
where the lambda lacks its argument name, there's only the argument type.
Another example is where usage of :
instead of =
in record values results in errors somewhere else completely.
Metadata
Metadata
Assignees
Labels
No labels
Activity