
#10180: Lint check: Empty alternatives imply bottoming scrutinee -------------------------------------+------------------------------------- Reporter: nomeata | Owner: nomeata Type: task | Status: infoneeded Priority: normal | Milestone: Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by simonpj): Well that's why I said (somewhere) that I wasn't certain this would work, but it would be interesting to know. The point is: to make the empty case, GHC '''knew''' at some point that the expression must diverge. So how has it lost that knowledge? I think that in this case it's a use of `dataConCantMatch`. So maybe we can beef up `isEmptyTy` to use that information? (And ultimately perhaps beef up `exprIsBottom`.) My point is, this is a useful quest. Simon -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10180#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler