Linear types: fix varMult for let-bound variables
Linear types add a new field varMult
to Id
.
Currently, this field stores a multiplicity for lambda-bound variables and case binders, and an arbitrary value for let-bound variables (which is ignored, Note [Multiplicity of let binders]). Instead, varMult should be a Maybe
which is Nothing
if this value is not used. Going further, instead of Nothing
, let-bound variables could store their aliased usage environment.