Fix three problems with occurrence analysis on case alternatives.
authorAndrew Farmer <afarmer@ittc.ku.edu>
Tue, 19 Aug 2014 02:40:12 +0000 (21:40 -0500)
committerAustin Seipp <austin@well-typed.com>
Tue, 19 Aug 2014 04:26:18 +0000 (23:26 -0500)
commit5d5655e9911dba10088b66421e98165c6cb8176e
tree536ef5960b4f8da22f45551430cf7f28b7f54d64
parent5b11b0401fecc848fe0db1fc060593a6ee8a560c
Fix three problems with occurrence analysis on case alternatives.

Summary:
  1. Respect condition (a) in Note [Binder swap]
  2. Respect condition (b) in Note [Binder swap]
  3. Return usage of any coercion variables in binder swap

Fixes T9440

Test Plan: See #9440

Reviewers: simonpj, austin

Reviewed By: simonpj, austin

Subscribers: simonpj, simonmar, relrod, ezyang, carter

Differential Revision: https://phabricator.haskell.org/D156

GHC Trac Issues: #9440
compiler/simplCore/OccurAnal.lhs