1. 22 Sep, 2015 1 commit
  2. 30 Jul, 2015 1 commit
    • JohnWiegley's avatar
      Improve error message for newtypes and deriving clauses · 4f80ec0e
      JohnWiegley authored
      Summary:
      Change the error message generated when a deriving clause related to a newtype
      fails to always suggested trying GeneralizedNewtypeDeriving, even in
      situations where it may not work. Fixes #9600.
      
      Test Plan: testsuite/deriving/should_fail/9600.hs
      
      Reviewers: austin, bgamari, simonpj
      
      Rebased-by: bgamari
      
      Reviewed By: simonpj
      
      Subscribers: bgamari, hvr, simonmar, carter
      
      Differential Revision: https://phabricator.haskell.org/D216
      
      GHC Trac Issues: #9600
      4f80ec0e
  3. 26 Jun, 2015 1 commit
  4. 22 Apr, 2015 1 commit
  5. 07 Mar, 2015 1 commit
    • Iavor S. Diatchki's avatar
      Custom `Typeable` solver, that keeps track of kinds. · b359c886
      Iavor S. Diatchki authored
      Summary:
      This implements the new `Typeable` solver: when GHC sees `Typeable` constraints
      it solves them on the spot.
      
      The current implementation creates `TyCon` representations on the spot.
      
      Pro: No overhead at all in code that does not use `Typeable`
      Cons: Code that uses `Typeable` may create multipe `TyCon` represntations.
      
      We have discussed an implementation where representations of `TyCons` are
      computed once, in the module, where a datatype is declared.  This would
      lead to more code being generated:  for a promotable datatype we need to
      generate `2 + number_of_data_cons` type-constructro representations,
      and we have to do that for all programs, even ones that do not intend to
      use typeable.
      
      I added code to emit warning whenevar `deriving Typeable` is encountered---
      the idea being that this is not needed anymore, and shold be fixed.
      
      Also, we allow `instance Typeable T` in .hs-boot files, but they result
      in a warning, and are ignored.  This last one was to avoid breaking exisitng
      code, and should become an error, eventually.
      
      Test Plan:
      1. GHC can compile itself.
      2. I compiled a number of large libraries, including `lens`.
          - I had to make some small changes:
            `unordered-containers` uses internals of `TypeReps`, so I had to do a 1 line fix
          - `lens` needed one instance changed, due to a poly-kinded `Typeble` instance
      
      3. I also run some code that uses `syb` to traverse a largish datastrucutre.
      I didn't notice any signifiant performance difference between the 7.8.3 version,
      and this implementation.
      
      Reviewers: simonpj, simonmar, austin, hvr
      
      Reviewed By: austin, hvr
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D652
      
      GHC Trac Issues: #9858
      b359c886
  6. 12 Dec, 2014 1 commit
    • eir@cis.upenn.edu's avatar
      Rewrite `Coercible` solver · 0cc47eb9
      eir@cis.upenn.edu authored
      Summary:
      This is a rewrite of the algorithm to solve for Coercible "instances".
      
      A preliminary form of these ideas is at
      https://ghc.haskell.org/trac/ghc/wiki/Design/NewCoercibleSolver
      
      The basic idea here is that the `EqPred` constructor of `PredTree`
      now is parameterised by a new type `EqRel` (where
      `data EqRel = NomEq | ReprEq`). Thus, every equality constraint can
      now talk about nominal equality (the usual case) or representational
      equality (the `Coercible` case).
      
      This is a change from the previous
      behavior where `Coercible` was just considered a regular class with
      a special case in `matchClassInst`.
      
      Because of this change, representational equalities are now
      canonicalized just like nominal ones, allowing more equalities
      to be solved -- in particular, the case at the top of #9117.
      
      A knock-on effect is that the flattener must be aware of the
      choice of equality relation, because the inert set now stores
      both representational inert equalities alongside the nominal
      inert equalities. Of course, we can use representational equalities
      to rewrite only within another representational equality --
      thus the parameterization of the flattener.
      
      A nice side effect of this change is that I've introduced a new
      type `CtFlavour`, which tracks G vs. W vs. D, removing some ugliness
      in the flattener.
      
      This commit includes some refactoring as discussed on D546.
      It also removes the ability of Deriveds to rewrite Deriveds.
      
      This fixes bugs #9117 and #8984.
      
      Reviewers: simonpj, austin, nomeata
      
      Subscribers: carter, thomie
      
      Differential Revision: https://phabricator.haskell.org/D546
      
      GHC Trac Issues: #9117, #8984
      0cc47eb9
  7. 04 Nov, 2014 1 commit
  8. 18 Oct, 2014 1 commit
    • mgmeier's avatar
      Remove obsolete Data.OldTypeable (#9639) · 7369d259
      mgmeier authored
      This finally removes the `Data.OldTypeable` module (which
      has been deprecated in 7.8), from `base`, compiler and testsuite.
      
      The deprecated `Typeable{1..7}` aliases in `Data.Typeable` are not
      removed yet in order to give existing code a bit more time to adapt.
      
      Reviewed By: hvr, dreixel
      
      Differential Revision: https://phabricator.haskell.org/D311
      7369d259
  9. 06 May, 2014 1 commit
  10. 14 Mar, 2014 1 commit
  11. 09 Feb, 2014 1 commit
  12. 09 Jan, 2014 1 commit
  13. 20 Sep, 2013 1 commit
  14. 18 Sep, 2013 1 commit
  15. 02 Aug, 2013 1 commit
    • eir@cis.upenn.edu's avatar
      Add tests for roles. · 929155fa
      eir@cis.upenn.edu authored
      Many of the files modified are just wibbles to output, because now
      tycons have roles attached to them, which are produced in the debugging
      dumps.
      929155fa
  16. 05 Jun, 2013 1 commit
  17. 21 May, 2013 1 commit
  18. 12 Feb, 2013 1 commit
    • jpm@cs.ox.ac.uk's avatar
      Implement poly-kinded Typeable · 94d8b995
      jpm@cs.ox.ac.uk authored
      This patch makes the Data.Typeable.Typeable class work with arguments of any
      kind. In particular, this removes the Typeable1..7 class hierarchy, greatly
      simplyfing the whole Typeable story. Also added is the AutoDeriveTypeable
      language extension, which will automatically derive Typeable for all types and
      classes declared in that module. Since there is now no good reason to give
      handwritten instances of the Typeable class, those are ignored (for backwards
      compatibility), and a warning is emitted.
      
      The old, kind-* Typeable class is now called OldTypeable, and lives in the
      Data.OldTypeable module. It is deprecated, and should be removed in some future
      version of GHC.
      94d8b995
  19. 22 Jan, 2013 1 commit
  20. 09 Mar, 2012 1 commit
  21. 12 Dec, 2011 1 commit
  22. 14 Sep, 2011 1 commit
  23. 23 Jul, 2011 1 commit
  24. 20 Jul, 2011 1 commit
  25. 15 Dec, 2010 1 commit
  26. 20 Nov, 2010 1 commit
  27. 30 Jan, 2010 1 commit
  28. 29 Oct, 2009 1 commit
  29. 16 Mar, 2009 1 commit
  30. 08 Feb, 2009 1 commit
  31. 18 Jan, 2009 1 commit
  32. 17 Jan, 2009 1 commit
  33. 31 Dec, 2008 1 commit
  34. 30 Dec, 2008 1 commit
  35. 25 Oct, 2008 1 commit
  36. 17 Sep, 2008 1 commit
  37. 14 Aug, 2008 1 commit
  38. 01 Jul, 2008 1 commit
  39. 21 Nov, 2007 1 commit
  40. 20 Nov, 2007 1 commit