Core Lint: ensure primops can be eta-expanded
This patch adds a check to Core Lint, checkCanEtaExpand
, which ensures that primops and other wired-in functions with no binding (such as unsafeCoerce#
, oneShot
, rightSection
...) can always be eta-expanded, by checking that the remaining argument types have a fixed runtime representation.
Fixes #20480 (closed).