1. 29 Nov, 2016 26 commits
  2. 28 Nov, 2016 5 commits
    • Simon Peyton Jones's avatar
      Comments only (related to #12789) · 3aa93689
      Simon Peyton Jones authored
      It took me some time to find the right Note for the
      fix to #12789.  This comment patch tries to add pointers
      from relevant places.
      3aa93689
    • Simon Peyton Jones's avatar
      Test Trac #12885 · 27a6bdf0
      Simon Peyton Jones authored
      ...which is fixed by
      
        commit 0476a64e
        Author: Simon Peyton Jones <simonpj@microsoft.com>
        Date:   Tue Oct 25 15:22:17 2016 +0100
      
          Fix a bug in mk_superclasses_of
      27a6bdf0
    • Simon Peyton Jones's avatar
      Test Trac #12776 · 605af54a
      Simon Peyton Jones authored
      605af54a
    • Gabor Greif's avatar
      Typos in comments only [ci skip] · 52388421
      Gabor Greif authored
      52388421
    • Simon Peyton Jones's avatar
      Fix an long-standing bug in OccurAnal · 6ec2304f
      Simon Peyton Jones authored
      This bug was beautifully characterised in Trac #12776,
      which showed a small program for which the inliner went
      into an infinite loop.  Eeek.
      
      It turned out to be a genuine and long-standing bug in
      the occurrence analyer, specifically in the bit that
      identifies loop breakers.  In this line
      
        pairs | isEmptyVarSet weak_fvs
              = reOrderNodes   0 bndr_set weak_fvs tagged_nodes []
              | otherwise
              = loopBreakNodes 0 bndr_set weak_fvs loop_breaker_edges []
      
      the 'tagged_nodes' should be 'loop_breaker_edges'.
      That's it!
      
      The diff looks a lot bigger because I did some work on
      comments and variable naming, but that's all it is.  We
      were using the wrong set of dependencies!
      
      I'm astonished that this bug has not caused more trouble.
      It dates back to at least 2011 and maybe further.
      6ec2304f
  3. 25 Nov, 2016 9 commits
    • Simon Peyton Jones's avatar
      Be a bit more selective about improvement · f8c966c7
      Simon Peyton Jones authored
      This patch makes [W] constraints not participate in
      improvement.   See Note [Do not do improvement for WOnly]
      in TcSMonad.
      
      Removes some senseless work duplication in some cases (notably
      Trac #12860); should not change behaviour.
      f8c966c7
    • Simon Peyton Jones's avatar
      A tiny bit more tc tracing · 086b4836
      Simon Peyton Jones authored
      086b4836
    • Simon Peyton Jones's avatar
      Fix inference of partial signatures · 1bfff60f
      Simon Peyton Jones authored
      When we had
        f :: ( _ ) => blah
      we were failing to call growThetaTyVars, as we do in the
      no-type-signature case, and that meant that we weren't generalising
      over the right type variables.  I'm quite surprised this didn't cause
      problems earlier.
      
      Anyway Trac #12844 showed it up and this patch fixes it
      1bfff60f
    • Simon Peyton Jones's avatar
      Refactor functional dependencies a bit · eb55ec29
      Simon Peyton Jones authored
      * Rename CoAxiom.Eqn = Pair Type to TypeEqn,
        and use it for fundeps
      
      * Use the FunDepEqn for injectivity, which lets us share a bit
        more code, and (more important) brain cells
      
      * When generating fundeps, take the max depth of the two
        constraints.  This aimed at tackling the strange loop in
        Trac #12860, but there is more to come for that.
      
      * Improve pretty-printing with -ddump-tc-trace
      eb55ec29
    • Simon Peyton Jones's avatar
      Improve pretty-printing of types · 5f349fe2
      Simon Peyton Jones authored
      In this commit
         commit 6c0f10fa
         Author: Ben Gamari <bgamari.foss@gmail.com>
         Date:   Sun Nov 13 16:17:37 2016 -0500
      
          Kill Type pretty-printer
      
      we switched to pretty-printing a type by converting it to an
      IfaceType and pretty printing that.  Very good.
      
      This patch fixes two things
      
      * The new story is terrible for debug-printing with -ddump-tc-trace,
        because all the extra info in an open type was discarded ty the
        conversion to IfaceType.
      
        This patch adds IfaceTcTyVar to IfaceType, to carry a TcTyVar in
        debug situations.  Quite an easy change, happily.  These things
        never show up in interface files.
      
      * Now that we are going via IfaceType, it's essential to tidy before
        converting; otherwise
           forall k_23 k_34. blah
        is printed as
           forall k k. blah
        which is very unhelpful.  Again this only shows up in debug
        printing.
      5f349fe2
    • Simon Peyton Jones's avatar
      Use TyVars in PatSyns · 12eff239
      Simon Peyton Jones authored
      I found that some TcTyVars were lurking in a PatSyn, because
      tc_patsyn_finish was using the TcType -> TcType zonker rather
      than the TcType -> Type zonker.  Eeek.
      
      I fixing this I also tided up function naming a bit (still not
      terrific), and removed the unused TcTyBinder type entirely.
      12eff239
    • Simon Peyton Jones's avatar
      Use TyVars in a DFunUnfolding · edbe8319
      Simon Peyton Jones authored
      En route to something else I discovered that TcInstDcls.addDFunPrags
      was building a DFunUnfolding that had TcTyVars in it.  They should
      never survive beyond type checking.  It was harmeless, but now affects
      type pretty-printing.
      
      This patch fixes it.
      edbe8319
    • Simon Peyton Jones's avatar
      Use 'v' instead of 'tpl' for template vars · bc35c3f9
      Simon Peyton Jones authored
      Just affects Id.mkTemplateLocal, and should make debug prints
      a little less voluminous.  No user-visible change here.
      bc35c3f9
    • Simon Peyton Jones's avatar
      Kill off ifaceTyVarsOfType · a5a39264
      Simon Peyton Jones authored
      IfaceTypes are really not well suited to finding free variables etc.
      Nevertheless, there was quite a lot of code to do just that; but it
      was only used to see if a kind is variable-free so as to decide
      whether to print a forall binder.
      
      This patch simplifies to deal with just that case, replacing all
      the free-vars stuff with just ifTypeIsVarFree
      a5a39264