1. 20 Apr, 2016 6 commits
  2. 19 Apr, 2016 3 commits
  3. 18 Apr, 2016 6 commits
  4. 17 Apr, 2016 9 commits
  5. 16 Apr, 2016 3 commits
  6. 15 Apr, 2016 10 commits
  7. 11 Apr, 2016 3 commits
    • Ryan Scott's avatar
      Deriving Functor-like classes should unify kind variables · 9c48d8a0
      Ryan Scott authored
      While the deriving machinery always unifies the kind of the typeclass
      argument with the kind of the datatype, this proves not to be sufficient
      to produce well kinded instances for some poly-kinded datatypes. For
      example:
      
      ```
      newtype Compose (f :: k2 -> *) (g :: k1 -> k2) (a :: k1)
        = Compose (f (g a)) deriving Functor
      ```
      
      would fail because only `k1` would get unified with `*`, causing the
      following
      ill kinded instance to be generated:
      
      ```
      instance (Functor (f :: k2 -> *), Functor (g :: * -> k2)) =>
        Functor (Compose f g) where ...
      ```
      
      To prevent this, we need to take the subtypes and unify their kinds with
      `* -> *`.
      
      Fixes #10524 for good.
      
      Test Plan: ./validate
      
      Reviewers: simonpj, hvr, austin, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2097
      
      GHC Trac Issues: #10524, #10561
      
      (cherry picked from commit aadde2b9)
      9c48d8a0
    • duairc's avatar
      Added (more) missing instances for Identity and Const · 7b8beba7
      duairc authored
        * `Identity` and `Const` now have `Num`, `Real`, `Integral`,
          `Fractional`, `Floating`, `RealFrac` and `RealFloat` instances
      
        * `Identity` and `Const` now have `Bits` and `FiniteBits` instances
      
        * `Identity` and `Const` now have `IsString` instances
      
      Reviewers: RyanGlScott, austin, hvr, bgamari, ekmett
      
      Reviewed By: ekmett
      
      Subscribers: nomeata, ekmett, RyanGlScott, thomie
      
      Differential Revision: https://phabricator.haskell.org/D2079
      
      GHC Trac Issues: #11790
      
      (cherry picked from commit 8b57cac5)
      7b8beba7
    • Ryan Scott's avatar
      Filter out invisible kind arguments during TH reification · a1fa34ce
      Ryan Scott authored
      Previously, all kind arguments were being reified, which would cause
      something like this:
      
      ```
      type Id a = a
      data Proxy (a :: Id k) = Proxy
      ```
      
      to output
      
      ```
      data Proxy (a :: Id * k) = Proxy
      ```
      
      when `Proxy`'s `Info` is reified. The fix is simple: simply call
      `filterOutInvisibleTypes` on the kind arguments of a kind synonym
      application.
      
      Fixes #11463.
      
      Test Plan: ./validate
      
      Reviewers: austin, bgamari, goldfire
      
      Reviewed By: goldfire
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2081
      
      GHC Trac Issues: #11463
      
      (cherry picked from commit 02a5c580)
      a1fa34ce