Skip to content
  • Ryan Scott's avatar
    Fix #14869 by being more mindful of Type vs. Constraint · 49ac3f0f
    Ryan Scott authored
    Summary:
    Before, we were using `isLiftedTypeKind` in `reifyType`
    before checking if a type was `Constraint`. But as it turns out,
    `isLiftedTypeKind` treats `Constraint` the same as `Type`, so every
    occurrence of `Constraint` would be reified as `Type`! To make things
    worse, the documentation for `isLiftedTypeKind` stated that it
    treats `Constraint` //differently// from `Type`, which simply isn't
    true.
    
    This revises the documentation for `isLiftedTypeKind` to reflect
    reality, and defers the `isLiftedTypeKind` check in `reifyType` so
    that it does not accidentally swallow `Constraint`.
    
    Test Plan: make test TEST=T14869
    
    Reviewers: goldfire, bgamari
    
    Reviewed By: goldfire
    
    Subscribers: rwbarton, thomie, carter
    
    GHC Trac Issues: #14869
    
    Differential Revision: https://phabricator.haskell.org/D4474
    49ac3f0f