
#13990: Core Lint error on empty case
-------------------------------------+-------------------------------------
Reporter: mbieleck | Owner: (none)
Type: bug | Status: patch
Priority: highest | Milestone: 8.2.3
Component: Compiler | Version: 8.2.1-rc3
Resolution: | Keywords: core-lint
| case
Operating System: Unknown/Multiple | Architecture:
Type of failure: Compile-time | Unknown/Multiple
crash or panic | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D4160
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by dfeuer):
Simon asked me to note here that his remark in comment:9 about
`checkCaseAlts` was a bit off. The `null alts` there is doing something a
bit different: allowing case matches with no alternatives on "nearly-
infinite" types like `Int#`. Pulling that test out actually makes the
build fail. Why? That's not actually entirely clear to me. Somewhere in
`Text` internals, we get a Core Lint error
{{{
5258 <no location info>: warning:
5259 In a case alternative: (I# n#_a4mN :: Int#)
5260 Case expression with non-exhaustive alternatives
5261 case lvl_sfty n#_a4mN of wild_00 { }
}}}
This is slightly surprising, because the relevant `lvl_sfty` seems to be
{{{
29713 lvl_sfty :: Int# -> Int#
29714 [LclId,
29715 Arity=1,
29716 Str=