1. 12 Feb, 2017 2 commits
  2. 11 Feb, 2017 1 commit
  3. 10 Feb, 2017 6 commits
    • Ryan Scott's avatar
      Refactor DeriveAnyClass's instance context inference · 639e702b
      Ryan Scott authored
      Summary:
      Currently, `DeriveAnyClass` has two glaring flaws:
      
      * It only works on classes whose argument is of kind `*` or `* -> *` (#9821).
      * The way it infers constraints makes no sense. It basically co-opts the
        algorithms used to infer contexts for `Eq` (for `*`-kinded arguments) or
        `Functor` (for `(* -> *)`-kinded arguments). This tends to produce overly
        constrained instances, which in extreme cases can lead to legitimate things
        failing to typecheck (#12594). Or even worse, it can trigger GHC panics
        (#12144 and #12423).
      
      This completely reworks the way `DeriveAnyClass` infers constraints to fix
      these two issues. It now uses the type signatures of the derived class's
      methods to infer constraints (and to simplify them). A high-level description
      of how this works is included in the GHC users' guide, and more technical notes
      on what is going on can be found as comments (and a Note) in `TcDerivInfer`.
      
      Fixes #9821, #12144, #12423, #12594.
      
      Test Plan: ./validate
      
      Reviewers: dfeuer, goldfire, simonpj, austin, bgamari
      
      Subscribers: dfeuer, thomie
      
      Differential Revision: https://phabricator.haskell.org/D2961
      639e702b
    • Facundo Domínguez's avatar
      Relax test TH_addCStub2 so it succeeds on travis. · e79ef75d
      Facundo Domínguez authored
      Test Plan: ./validate
      
      Reviewers: bgamari, nomeata, austin, mpickering
      
      Reviewed By: mpickering
      
      Subscribers: mpickering, rwbarton, mboes, thomie
      
      Differential Revision: https://phabricator.haskell.org/D3124
      e79ef75d
    • Ryan Scott's avatar
      Prevent Template Haskell splices from throwing a spurious TypeInType error · 283a3465
      Ryan Scott authored
      Summary:
      There was a rather annoying corner case where splicing poly-kinded
      Template Haskell declarations could trigger an error muttering about
      `TypeInType` not being enabled, whereas the equivalent non-TH code would
      compile without issue. This was causing by overzealous validity check in the
      renamer, wherein failed to distinguish between two different `Exact` names
      with the same `OccName`. As a result, it mistakenly believed some type
      variables were being used as both type and kind variables simultaneously! Ack.
      
      This avoids the issue by simply disabling the aforementioned validity check
      for Exact names. Fixes #12503.
      
      Test Plan: ./validate
      
      Reviewers: austin, bgamari, goldfire
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D3022
      283a3465
    • Simon Peyton Jones's avatar
      Change rewritableTyVarsOfType to anyRewritableTyVar · 76244ec2
      Simon Peyton Jones authored
      This fixes the regression in FrozenErrorTests, eliminates the
      awkward "crash on forall" in rewritableTyVars, and makes it more
      efficient too.
      76244ec2
    • Gabor Greif's avatar
      Spelling in comments [ci skip] · 3211fa06
      Gabor Greif authored
      3211fa06
    • Alan Zimmerman's avatar
      TH-spliced class instances are pretty-printed incorrectly post-#3384 · 258c7195
      Alan Zimmerman authored
      Summary:
      The HsSyn prettyprinter tests patch 499e4382
      broke the pretty-printing of Template Haskell-spliced class instances.
      
      Test Plan: ./validate
      
      Reviewers: RyanGlScott, austin, goldfire, bgamari
      
      Reviewed By: RyanGlScott, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D3043
      258c7195
  4. 09 Feb, 2017 9 commits
  5. 08 Feb, 2017 22 commits