The new top-level floating seemed like it could cause some uninformative
decompilations if the result of floating was stored. Previously it would
have been a letrec, but now it is just the body of said letrec, and the
bound definitions have been given their own references, with no obvious
way to inspect them. So, just using the original term seems like a
better idea.
Any top-level signature is stripped off, to be slightly less verbose.
Due to a missing case in the floating logic, definitions like:
f : ...
f x y z = ...
were being turned into:
f : ...
f =
g x y z = ...
g
Because the compiler thought the lambda needed to be floated out of the
signature ascription, as the original `f` is the same as:
f = (x y z -> ...) : ...
This is obviously not necessary, as the signature will be erased anyway,
and just results in extra indirection.
- This commit shuffles the order of how interactive evaluataion happens
to attempt to get decompiler output that is closer to the original
source.
- It only does floating before remembering the combinators, so output
shouldn't have compiled patterns and the like anymore.
- I was hoping that this might preserve some type annotations in
embedded docs, but it appears to not be the case.