Skip to content
Snippets Groups Projects
Forked from Glasgow Haskell Compiler / GHC
5811 commits behind the upstream repository.
  • Simon Peyton Jones's avatar
    bd0536af
    More fixes for `type data` declarations · bd0536af
    Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
    
    This MR fixes #23022 and #23023.  Specifically
    
    * Beef up Note [Type data declarations] in GHC.Rename.Module,
      to make invariant (I1) explicit, and to name the several
      wrinkles.
    
      And add references to these specific wrinkles.
    
    * Add a Lint check for invariant (I1) above.
      See GHC.Core.Lint.checkTypeDataConOcc
    
    * Disable the `caseRules` for dataToTag# for `type data` values.
      See Wrinkle (W2c) in the Note above.  Fixes #23023.
    
    * Refine the assertion in dataConRepArgTys, so that it does not
      complain about the absence of a wrapper for a `type data` constructor
      Fixes #23022.
    
    Acked-by: default avatarSimon Peyton Jones <simon.peytonjones@gmail.com>
    bd0536af
    History
    More fixes for `type data` declarations
    Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
    
    This MR fixes #23022 and #23023.  Specifically
    
    * Beef up Note [Type data declarations] in GHC.Rename.Module,
      to make invariant (I1) explicit, and to name the several
      wrinkles.
    
      And add references to these specific wrinkles.
    
    * Add a Lint check for invariant (I1) above.
      See GHC.Core.Lint.checkTypeDataConOcc
    
    * Disable the `caseRules` for dataToTag# for `type data` values.
      See Wrinkle (W2c) in the Note above.  Fixes #23023.
    
    * Refine the assertion in dataConRepArgTys, so that it does not
      complain about the absence of a wrapper for a `type data` constructor
      Fixes #23022.
    
    Acked-by: default avatarSimon Peyton Jones <simon.peytonjones@gmail.com>
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
T23022.hs 108 B