New Lint check: no alternatives implies bottoming expression
ClosedPublic

Authored by nomeata on Mar 23 2015, 8:34 AM.

Details

Summary
  • exprIsBottom should look through type lambdas as evaluting (\ (@ a) -> e) diverges if and only if evaluating e diverges. This was found in the context of Trac #10180.
  • New Lint check: no alternatives implies bottoming expression detected either by exprIsBottom or by an empty type. This was suggested by SPJ and fixes Trac #10180.

(will push these two bits sparately.)

Diff Detail

Repository
rGHC Glasgow Haskell Compiler
Branch
wip/T10180
Lint
Lint Skipped
Unit
Unit Tests Skipped
Build Status
Buildable 3482
Build 3509: GHC Patch Validation (amd64/Linux)
nomeata updated this revision to Diff 2517.Mar 23 2015, 8:34 AM
nomeata retitled this revision from to New Lint check: no alternatives implies bottoming expression.
nomeata updated this object.
nomeata edited the test plan for this revision. (Show Details)
nomeata added a reviewer: simonpj.
nomeata updated the Trac tickets for this revision.
nomeata updated this revision to Diff 2518.Mar 23 2015, 2:14 PM
nomeata edited edge metadata.

Move isEmptyTo to CoreUtils.

austin accepted this revision.Mar 23 2015, 2:19 PM
austin edited edge metadata.
austin added inline comments.
compiler/coreSyn/CoreUtils.hs
2111

Yay for everyone remembering comments :)

This revision is now accepted and ready to land.Mar 23 2015, 2:19 PM
nomeata closed this revision.Mar 23 2015, 2:45 PM

Pushed as rGHCa0678f1f0e62496c108491e1c80d5eef3936474a (I’m getting confused between to parallel DRs...)