[RFC] StgLint: Always add case binder to in-scope set
Changes PlannedPublic

Authored by bgamari on Aug 15 2017, 3:40 PM.

Details

Reviewers
austin
Trac Issues
#14118
Summary

Previously we wouldn't add the binder to the in-scope set if linting a MultiValAlt-flavoured case. However, this neglects to consider that the scrutinee may not be a unboxed tuple or sum but instead a void argument (e.g.
arity-0). In this case it is safe to use case binder (and indeed we do so).

bgamari created this revision.Aug 15 2017, 3:40 PM
bgamari updated this revision to Diff 13526.Aug 15 2017, 3:42 PM
  • Try workaround
bgamari retitled this revision from [RFC] StgLint: Always add case binder to in-scope set Previously we wouldn't add the binder to the in-scope set if linting a MultiValAlt-flavoured case. However, this neglects to consider that the scrutinee may not be a unboxed tuple or sum but... to [RFC] StgLint: Always add case binder to in-scope set.Aug 21 2017, 4:47 PM
bgamari edited the summary of this revision. (Show Details)

@simonpj, what do you think about this?

bgamari planned changes to this revision.Aug 24 2017, 11:45 AM

It turns out this isn't quite enough. It seems we currently produce code under the assumption that MultiValAlt binders are in scope inside the case.

austin resigned from this revision.Nov 9 2017, 5:37 PM