Closed tjpalmer closed 8 months ago
Turns out bubble doesn't really break it. Bubble just prevents auto fixing of it. We haven't included type definitions in module sorting, just the declarations. Because type definitions look like this rather than being assignments to LeftNameLeaf nodes like other things are:
(Call
(R class)
(V \word)
(V \Apple)
(V \concrete)
(V true)
(Fun
(V \typeDefined)
(V Apple)
...
Here's a case I'm adding to TmpLBackendTest for now, although maybe the impact is in frontend stages:
That currently renders to this TmpL:
Things are better in any of these cases, although some of these cases are better than others:
Oddly enough, some (all?) backends (also adding a LuaBackendTest case) seem to sort even a single apple instance to before the class definition, even though I'm not sure I see that in TmpLBackendTest. Here's the Lua case. This Temper:
Goes to this Lua: