Handle promoted data constructors in typeToLHsType correctly
Instead of using nlHsTyVar
, which hardcodes NotPromoted
, have
typeToLHsType
pick between Promoted
and NotPromoted
by checking
if a type constructor is promoted using isPromotedDataCon
.
Fixes #18020 (closed).