Relax the condition over which an expression is considered to be "fresh" to include bindings of match expression and seeing through non-recursive function.
It also changes the rule for Let for which I'm not so sure about:
Before: Let(vd, e, b) expression fresh iff e is fresh and b as well, where we consider vd as fresh when recurring on b
Now: Let(vd, e, b) fresh iff b is fresh, where we add vd as a fresh binding when recurring on b provided e is fresh.
These changes allows to accept FreshExpr.scala (which was rejected before).
It also improves a bit the "illegal aliasing" error messages.
Relax the condition over which an expression is considered to be "fresh" to include bindings of
match
expression and seeing through non-recursive function. It also changes the rule forLet
for which I'm not so sure about: Before:Let(vd, e, b)
expression fresh iffe
is fresh and b as well, where we considervd
as fresh when recurring onb
Now:Let(vd, e, b)
fresh iffb
is fresh, where we addvd
as a fresh binding when recurring onb
providede
is fresh. These changes allows to acceptFreshExpr.scala
(which was rejected before).It also improves a bit the "illegal aliasing" error messages.