Skip to content
  • Ryan Scott's avatar
    9de3f8b1
    Make isTcLevPoly more conservative with newtypes (#17360) · 9de3f8b1
    Ryan Scott authored and Marge Bot's avatar Marge Bot committed
    `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. This patch tweaks `isTcLevPoly` to return `True` for
    newtypes instead.
    
    Fixes #17360.
    9de3f8b1
    Make isTcLevPoly more conservative with newtypes (#17360)
    Ryan Scott authored and Marge Bot's avatar Marge Bot committed
    `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. This patch tweaks `isTcLevPoly` to return `True` for
    newtypes instead.
    
    Fixes #17360.
Loading