Skip to content

Make isTcLevPoly more conservative with newtypes (#17360)

Ryan Scott requested to merge wip/T17360 into master

isTcLevPoly gives an approximate answer for when a type constructor is levity polymorphic when fully applied, where True means "possibly levity polymorphic" and False means "definitely not levity polymorphic". isTcLevPoly returned False for newtypes, which is incorrect in the presence of UnliftedNewtypes, leading to #17360 (closed). This patch tweaks isTcLevPoly to return True for newtypes instead.

Fixes #17360 (closed).

Merge request reports