Skip to content

Core Lint: ensure primops can be eta-expanded

sheaf requested to merge sheaf/ghc:T20480 into master

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).

Edited by sheaf

Merge request reports