
Hi all,
CoreLint has a check that, when seeing a case expression with empty list of
alternatives, checks whether the scrutinee is bottom. This "bottom-ness" check
is, however, very simple and returning many false negatives. For example, when
it sees a case expression, all it does is:
go _ (Case _ _ _ alts) = null alts
Which is just too simple for some cases. (it could check if all the RHSs are
bottom, or if the scrutinee is bottom etc.)
I guess this makes sense, since it's OK to generate unreachable code, but it's
not OK to not generate a code in a reachable path.
But in my case this is becoming problem as it's rejecting my seemingly
valid program. One of the relevant parts in my code is this:
case ww_s4C3 of ww_X4Fb {
(#_||#) ww_s4Ce ->
case case ww_s4Ce of ww_s4F1 { (# ww_s4F2, ww_s4F3 #) ->
lvl_s4F4 ww_s4F3 ww_s4F2
}
of wild_00 {
-- empty
};
lvl_s4F4 :: Int# -> String -> Var
[LclId, Arity=2, Str=DmdType (args: