So, I feel like #GRTT as a core calculus could be amazing. In particular, I think type-driven evaluation (with grades in the types) suddenly gives the RTS perfect information about the exact point a object on the heap becomes unused (and then RTS can then arrange for eager [for scare resources] or delayed deallocation / resource reuse).
But, proving something like that is, I feel beyond my skills right now. I have a basic GRTT evaluator, but it's not heap-based and it doesn't make use of grade information.
I need to figure out a "better" approach for dealing with context-grade-vectors. Using higher-ranked types in GHC #Haskell ...is really hard for me to concentrate on enough.
Anyone want to dispel my illusions about the superiority of GRTT? Or failing that, want to give me tips for ... bi-directional typing or heap-based abstract machines when using a context type indexed by identifiers (scope-checked / scope-correct).