Closed basile-henry closed 3 years ago
I have started looking at implementing Text/replace
@basile-henry Are you planning on doing the with
change as well?
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. 😄
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?
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.
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:
Yeah, it's not the simplest architecture ><
https://github.com/dhall-lang/dhall-lang/blob/master/CHANGELOG.md#v1900
The main changes to implement are:
with
without desugaringText/replace
builtin