1. 08 Nov, 2017 1 commit
    • Simon Peyton Jones's avatar
      Minimise provided dictionaries in pattern synonyms · 2c2f3cea
      Simon Peyton Jones authored
      Trac #14394 showed that it's possible to get redundant
      constraints in the inferred provided constraints of a pattern
      synonym.  This patch removes the redundancy with mkMinimalBySCs.
      
      To do this I had to generalise the type of mkMinimalBySCs slightly.
      And, to reduce confusing reversal, I made it stable: it now returns
      its result in the same order as its input.  That led to a raft of
      error message wibbles, mostly for the better.
      2c2f3cea
  2. 10 Feb, 2017 1 commit
    • 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
  3. 21 Sep, 2012 1 commit
  4. 20 Jul, 2011 1 commit
  5. 12 Jan, 2011 1 commit
  6. 13 Sep, 2010 1 commit
  7. 28 Nov, 2009 1 commit
  8. 31 Dec, 2008 1 commit
  9. 30 Dec, 2008 1 commit
  10. 01 Jul, 2008 1 commit
  11. 28 Nov, 2007 1 commit
  12. 15 Dec, 2006 1 commit
  13. 01 Feb, 2006 1 commit
  14. 07 Jan, 2005 1 commit
  15. 01 Oct, 2004 1 commit
  16. 06 Jan, 2004 1 commit
  17. 29 Nov, 2002 1 commit
  18. 28 Mar, 2002 1 commit
  19. 27 Aug, 2001 1 commit
  20. 17 Aug, 2001 1 commit
  21. 26 Jun, 2001 1 commit