In #3352 an optimization to transform `ra = .field` into
```
ra = \#rcd -[ra]-> #rcd.field
```
rather than
```
__ra1 = \#rcd -[__ra1] -> #rcd.field
ra = LambdaSet { __ra1 }
```
was introduced. However, this optimization is not correct when `ra =
.field` is defined as a toplevel thunk, for in such situations we
indeed want the thunk `ra` to return the lambda set it resolves to,
rather than repointing at itself.
Besides reverting this change, another option would be to convert
accessors into closures before translation of Can to IR. However, this
complicates the translation algorithm more than it already is, and I'd
like to avoid additional special-cases.
Closes#4606
Previously, a program like
```
main =
f =
n = 1
\{} -[#lam]-> n # suppose lambda set = #lam
f {}
```
would be transformed to
```
main =
n = 1
f = \{} -[#lam]-> n
f {}
```
However, the IR lowering procedure is such that we would then associate
`f` as definining the procedure given the lambda set `#lam`. This is not
correct, as `f` is really a function pointer in this circumstance,
rather than the definer of `#lam`.
Instead, the transformation we want to perform is
```
main =
n = 1
#lam = \{} -[#lam]-> n
f = #lam
f {}
```
Which is what this patch does
Closes#2403
Makes sure that we turn on `debug-symbols` in mono tests, and that this
feature is fully respected in symbol generation, so that output in
release + debug builds are the same.
Closes#4435
Currently things like `1 / 200` lead to a miscompilation because we type
`200` (and as a result, both `1` and the division result) as a ranged
number with width >= U8. During mono that forces the number to become an
`I64` because our logic was that a ranged number can only become a float
if it's at least as wide as an I8. But this is incorrect; as long as the
type is wrapped in `Frac` constructor and it's a ranged number (and not
a ranged int), it should become a fractional type.
```
» 1 / 200
0.005 : Float *
```
Closes#4047