1. 05 Dec, 2011 3 commits
    • Simon Peyton Jones's avatar
      Allow full constraint solving under a for-all (Trac #5595) · 2e6dcdf7
      Simon Peyton Jones authored
      The main idea is that when we unify
          forall a. t1  ~  forall a. t2
      we get constraints from unifying t1~t2 that mention a.
      We are producing a coercion witnessing the equivalence of
      the for-alls, and inside *that* coercion we need bindings
      for the solved constraints arising from t1~t2.
      
      We didn't have way to do this before.  The big change is
      that here's a new type TcEvidence.TcCoercion, which is
      much like Coercion.Coercion except that there's a slot
      for TcEvBinds in it.
      
      This has a wave of follow-on changes. Not deep but broad.
      
      * New module TcEvidence, which now contains the HsWrapper
        TcEvBinds, EvTerm etc types that used to be in HsBinds
      
      * The typechecker works exclusively in terms of TcCoercion.
      
      * The desugarer converts TcCoercion to Coercion
      
      * The main payload is in TcUnify.unifySigmaTy. This is the
        function that had a gross hack before, but is now beautiful.
      
      * LCoercion is gone!  Hooray.
      
      Many many fiddly changes in conssequence.  But it's nice.
      2e6dcdf7
    • Simon Peyton Jones's avatar
      Comments only: EqVar vs Covar · 22b317b1
      Simon Peyton Jones authored
      22b317b1
    • Simon Peyton Jones's avatar
      bed4ec57
  2. 30 Nov, 2011 1 commit
  3. 29 Nov, 2011 17 commits
  4. 28 Nov, 2011 10 commits
  5. 27 Nov, 2011 6 commits
  6. 26 Nov, 2011 3 commits
    • Simon Peyton Jones's avatar
      Add missing cases in TcUnify.uUnfilledVars · e99f3234
      Simon Peyton Jones authored
      These missing cases dealt with unifying a meta type variable with a
      skolem when the kinds match -- a pretty common case.  The missing
      cases meant that instead of directly solving on the fly (which is easy
      in this situation) we were generating an equality constraint viat
      `utype_defer`.  This isn't *wrong*, but it's a lot less efficient than
      it could be!
      
      All this arose from investigating #5631.  This one change does this
      to the compiler allocation
      
      Before:
           821,257,552 bytes allocated in the heap
                    94 MB total memory in use (0 MB lost due to fragmentation)
      
        MUT     time    1.54s  (  1.67s elapsed)
        GC      time    1.36s  (  1.60s elapsed)
        Total   time    2.93s  (  3.27s elapsed)
      
      After:
           424,244,124 bytes allocated in the heap
                    49 MB total memory in use (0 MB lost due to fragmentation)
      
        MUT     time    0.64s  (  0.89s elapsed)
        GC      time    0.83s  (  0.77s elapsed)
        Total   time    1.47s  (  1.66s elapsed)
      
      Not bad for a 3-line change!
      e99f3234
    • Ian Lynagh's avatar
      124bad84
    • Ian Lynagh's avatar
      Record ValidateSpeed and ValidateHpc in mk/are-validating.mk · b60992f6
      Ian Lynagh authored
      This makes "make" keep working after a "./validate --fast".
      b60992f6