`with` expression fails during parsing
Closed this issue · 5 comments
Let me start of by saying thank you so much for the package!
The smallest example I can produce is:
let x = {=} in x with y = 42
which fails with:
thread 'main' panicked at 'Tried to union incompatible spans: WithSugar and Parsed(ParsedSpan { input: "let x = {=} in x with y = 42\n", start: 0, end: 12 })', /home/creek/.cargo/registry/src/github.com-1ecc6299db9ec823/dhall-0.5.3/src/syntax/ast/span.rs:69:18
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
curiously enough:
{=} with y = 42
works just fine, so it seems to be an interaction between with
and let
Thanks for the minimized test! I can't seem to reproduce your error; this parses and normalizes correctly for me. What is the code you're writing that crashes?
Are you using the latest version of dhall_rust?
Are you using the latest version of dhall_rust?
Yeah I'm using 0.5.3
I can't seem to reproduce your error; this parses and normalizes correctly for me. What is the code you're writing that crashes?
It's in a branch here: https://github.com/kritzcreek/vessel/tree/dhall-record. It reproduces when I run cargo run sources
, which tries to read the package-set.dhall
file in the repo root I commited. It's read in read_package_set
which fixes the expected type to HashMap<Name, PackageInfo>
if that matters.
Ah, turns out I had forgotten to publish a few changes, and I had already solved your problem ^^. This is fixed in 0.6.0 (there's a breaking change, see CHANGELOG.md).
Can you confirm that your issue is fixed?
Confirmed :) Thanks!