Nadrieril / dhall-rust

Maintainable configuration files, for Rust users
Other
303 stars 27 forks source link

Implement standard v19.0 #180

Closed basile-henry closed 3 years ago

basile-henry commented 3 years ago

https://github.com/dhall-lang/dhall-lang/blob/master/CHANGELOG.md#v1900

The main changes to implement are:

basile-henry commented 3 years ago

I have started looking at implementing Text/replace

Nadrieril commented 3 years ago

@basile-henry Are you planning on doing the with change as well?

basile-henry commented 3 years ago

I won't be able to work on that this coming week. So feel free to implement it if you want! Otherwise I might have a go next weekend. 😄

basile-henry commented 3 years ago

I'm working on the with changes. It's not the most straight forward thing to implement since I can't mutate any of Nir/Tir, but maybe I'm missing some utilities/traits that would help with this kind of deep transformation of the AST?

Nadrieril commented 3 years ago

Hmm, there should be no need for mutation. What currently happens is that with expressions are desugared in semantics::resolve::resolve::desugar. The new standard requires that we remove this desugaring step and instead do typechecking and normalization directly on the With expressions. Where would you need to mutate things? There are two passes of deep transformation: import&name resolution (which also does desugaring), and then conversion to Nir. You should not need to add a new deep transformation.

basile-henry commented 3 years ago

Where would you need to mutate things?

I probably don't need to, I just get lost in all the Tir, Nir, Hir, and NirKind while implementing type checking. I thought it would be easier to mutate records in place, but I changed my mind. I just need to keep track of more things but hopefully I'll get there :sweat_smile:

Nadrieril commented 3 years ago

Yeah, it's not the simplest architecture ><