Fix typechecking of promoted empty lists
The '[]
case in tc_infer_hs_type
is smart enough to handle arity-0 uses of
'[]
(see the newly added T23543
test case for an example), but the '[]
case in tc_hs_type
was not. We fix this by changing the tc_hs_type
case to
invoke tc_infer_hs_type
, as prescribed in Note [Future-proofing the type checker]
.
Fixes #23543 (closed).