Allow type_argument to weaken return modes of expected function types#24
Allow type_argument to weaken return modes of expected function types#24
Conversation
8edb70b to
fc59848
Compare
lpw25
left a comment
There was a problem hiding this comment.
I don't love this. The type_argument stuff is already a hack that confuses people, and I don't like that we're only doing it down the return side. However, I assume we can probably ditch this once arity/currying is sorted out, so it seems fine to have for now. Also, whilst type_argument is a hack, it was designed for exactly this problem with higher-order functions and multiple arrow types, so we're not making things worse.
My thoughts exactly. |
fc59848 to
43af31a
Compare
|
Pushed updated tests. |
43af31a to
0d40cd8
Compare
0d40cd8 to
9729d8f
Compare
* Comballoc bugfix for local types. When Comballoc does an actual allocation, the state of the other allocation must must be preserved, as there are two independent allocation combining sequences. * Bugfix for type_function: check return modes of curried lambdas * Print total local allocations under v=0x400 * Rudimentary GC scanning for local types
If e.g.
fold_leftaccepts a local closure, then(+)stops being a valid thing to pass to fold_left, as its intermediate return mode is global rather than local. This patch makestype_argumentintroduce fresh mode variables for return modes to allow this case to go through.