1. 28 Sep, 2012 5 commits
  2. 21 Sep, 2012 1 commit
  3. 20 Sep, 2012 2 commits
  4. 18 Sep, 2012 3 commits
    • Simon Peyton Jones's avatar
      Make sure that even insoluble constraints are fully substituted · 94291904
      Simon Peyton Jones authored
      The main change is that canEqFailure does substitution:
      see Note [Make sure that insolubles are fully rewritten] in TcCanonical.
      However DV and I also found a way to simplify 'flatten' a bit, by
      passing a CtFlavour instead of CtEvidence.
    • Simon Peyton Jones's avatar
      Signatures and comments · 09a06701
      Simon Peyton Jones authored
    • Simon Peyton Jones's avatar
      Make a start towards eta-rules and injective families · 58470fb7
      Simon Peyton Jones authored
      * Make Any into a type family (which it should always have been)
        This is to support the future introduction of eta rules for
        product types (see email on ghc-users title "PolyKind issue"
        early Sept 2012)
      * Add the *internal* data type support for
          (a) closed type families [so that you can't give
              type instance for 'Any']
          (b) injective type families [because Any is really
        This amounts to two boolean flags on the SynFamilyTyCon
        constructor of TyCon.SynTyConRhs.
      There is some knock-on effect, but all of a routine nature.
      It remains to offer source syntax for either closed or
      injective families.
  5. 17 Sep, 2012 11 commits
    • Simon Peyton Jones's avatar
      Make the call to chooseBoxingStrategy lazy again · ba8fd081
      Simon Peyton Jones authored
      I made it strict, as an incidental consequence of this patch:
        commit 5bae803a
        Author: Simon Peyton Jones <simonpj@microsoft.com>
        Date:   Sat Sep 15 23:09:25 2012 +0100
            Fix UNPACK with -fomit-interface-pragmas.
      But it's very important that chooseBoxingStrategy is lazy, else
      (in bigger programs with lots of recursion in types) GHC can
      loop. This showed up in Data.Sequence; and I think it was making
      haddock loop as well.
      Anyway this patch makes it lazy again.
    • ian@well-typed.com's avatar
      Move tARGET_* out of HaskellConstants · 10cc4224
      ian@well-typed.com authored
    • Simon Peyton Jones's avatar
      Implement 'left' and 'right' coercions · af7cc995
      Simon Peyton Jones authored
      This patch finally adds 'left' and 'right' coercions back into
      GHC.  Trac #7205 gives the details.
      The main change is to add a new constructor to Coercion:
        data Coercion
          = ...
          | NthCo  Int         Coercion     -- OLD, still there
          | LRCo   LeftOrRight Coercion     -- NEW
        data LeftOrRight = CLeft | CRight
        * Similar change to TcCoercion
        * Use LRCo when decomposing AppTys
        * Coercion optimisation needs to handle left/right
      The rest is just knock-on effects.
    • Simon Peyton Jones's avatar
    • Simon Peyton Jones's avatar
    • Simon Peyton Jones's avatar
      Remove cc_ty from CIrredCan and cc_hole_ty from CHoleCan · 1a6ab644
      Simon Peyton Jones authored
      A simple refactoring with no complicated fiddling.
    • Simon Peyton Jones's avatar
      Another refactoring of constraints · d30b9cf4
      Simon Peyton Jones authored
      1. Rejig CtLoc
         * CtLoc is now *not* parameterised (much simpler)
         * CtLoc includes the "depth" of the constraint
         * CtLoc includes the TcLclEnv at the birthplace
           That gives (a) the SrcSpan, (b) the [ErrCtxt]
           (c) the [TcIdBinder]
         * The CtLoc of a constraint is no longer in its CtEvidence
         * Where we passed 'depth' before, now we pass CtLoc
      2. Some significant refactoring in TcErrors
         * Get rid of cec_extra
         * Traverse every constraint, so that we can be
           sure to generate bindings where necessary.
           (This was really a lurking bug before.)
      3. Merge zonking into TcCanonical.  This turned out to be
         almost trivial; just a small change to TcCanonical.flattenTyVar.
         The nice consequence is that we don't need to zonk a constraint
         before solving it; instead it gets zonked "on the fly" as it were.
    • Simon Peyton Jones's avatar
      Improve the binding location of class methods (I think) · 06832583
      Simon Peyton Jones authored
      I've totally forgotten what this patch is fixing, but it's all about
      getting the right source location for class methods.  It's fairly
      minor, but annoying that I can't connect it with a Trac ticket
    • Simon Peyton Jones's avatar
    • Simon Peyton Jones's avatar
      Spelling in comments only · 5f312c87
      Simon Peyton Jones authored
    • Simon Peyton Jones's avatar
      Add type "holes", enabled by -XTypeHoles, Trac #5910 · 8a9a7a8c
      Simon Peyton Jones authored
      This single commit combines a lot of work done by
      Thijs Alkemade <thijsalkemade@gmail.com>, plus a slew
      of subsequent refactoring by Simon PJ.
      The basic idea is
      * Add a new expression form "_", a hole, standing for a not-yet-written expression
      * Give a useful error message that
         (a) gives the type of the hole
         (b) gives the types of some enclosing value bindings that
             mention the hole
      Driven by this goal I did a LOT of refactoring in TcErrors, which in turn
      allows us to report enclosing value bindings for other errors, not just
      holes.  (Thijs rightly did not attempt this!)
      The major data type change is a new form of constraint
        data Ct = ...
          	  | CHoleCan {
          	      cc_ev       :: CtEvidence,
          	      cc_hole_ty  :: TcTauType,
          	      cc_depth    :: SubGoalDepth }
      I'm still in two minds about whether this is the best plan. Another
      possibility would be to have a predicate type for holes, somthing like
         class Hole a where
           holeValue :: a
      It works the way it is, but there are some annoying special cases for
      CHoleCan (just grep for "CHoleCan").
  6. 16 Sep, 2012 1 commit
  7. 15 Sep, 2012 1 commit
  8. 14 Sep, 2012 2 commits
  9. 10 Sep, 2012 1 commit
  10. 09 Sep, 2012 1 commit
  11. 06 Sep, 2012 2 commits
  12. 03 Sep, 2012 7 commits
  13. 01 Sep, 2012 2 commits
  14. 31 Aug, 2012 1 commit
    • Simon Peyton Jones's avatar
      More simplifications to the constraint solver · b737a453
      Simon Peyton Jones authored
      * inert_solved becomes dictionaries-only, inert_solved_dicts
      * inert_solved_dicts is used only to cache the result of uses
        of a top level instance declaration, just like inert_solved_funeqs
      * That in turn simplifies xCtFlavor and rewriteCtFlavor, because
        they no longer need a "should I cache" parameter.  (Moreover the
        settings for this parameter were very subtle; it's easy to get
        loops if you cache too much.  Caching only top-level instance
        uses is much safer, and eliminates all these subtle cases.)