Skip to content
  • Simon Peyton Jones's avatar
    Don't generate wrappers for `type data` constructors with StrictData · 5e4f4ba8
    Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
    Previously, the logic for checking if a data constructor needs a wrapper or not
    would take into account whether the constructor's fields have explicit
    strictness (e.g., `data T = MkT !Int`), but the logic would _not_ take into
    account whether `StrictData` was enabled. This meant that something like `type
    data T = MkT Int` would incorrectly generate a wrapper for `MkT` if
    `StrictData` was enabled, leading to the horrible errors seen in #24620. To fix
    this, we disable generating wrappers for `type data` constructors altogether.
    
    Fixes #24620
    
    .
    
    Co-authored-by: default avatarRyan Scott <ryan.gl.scott@gmail.com>
    5e4f4ba8