With custom memory types added, the automatic freeing for stack variables only works on cells of type Any. There may be other resources that the typechecker should know is automatically freed at the end of the sequence (e.g. gpu thread local registers).
Is it reasonable to just hard code these other rules for each platform in here or do we want some kind of mechanism by which the user can declare what types of cells should be automatically reclaimed by the typechecker?
With custom memory types added, the automatic freeing for stack variables only works on cells of type Any. There may be other resources that the typechecker should know is automatically freed at the end of the sequence (e.g. gpu thread local registers).
Is it reasonable to just hard code these other rules for each platform in here or do we want some kind of mechanism by which the user can declare what types of cells should be automatically reclaimed by the typechecker?