Conversation

c) Just don't weaken forward decl types. You only ever lose scoping information by weakening, you can still do everything if forward types stay in their original scope.
1
1
c) seems nicest and easiest to me for your current impl, a) is OK and simple but I'd generally avoid weakening, b) is not so simple but you may need it anyway if you also want non-bloated meta solutions.
1
I mean, when you elaborate a forward type, it's valid in the current context, and then you leave the type in that context, so check_items returns something which contains forward types and definitions interleaved (or in any way which remembers scopes).
2
1
a forward decl is something like forward : Bool; bar : Bar; forward = true; Note that when I elaborate the type annotation `Bool` into the core syntax it is using debruijn indices, meaning I can't freely copy that term around and use it in nested scopes.
2
Show replies
Show replies