1. 25 Nov, 2016 11 commits
    • Simon Peyton Jones's avatar
      Test Trac #12867 · f0f46826
      Simon Peyton Jones authored
    • Simon Peyton Jones's avatar
      Fix a name-space problem with promotion · c1b4b769
      Simon Peyton Jones authored
      Trac #12686 showed that we were allowing a term variable into
      a type, by promotion.  I chose to squash this in the renamer.
    • Gabor Greif's avatar
      Typos in comments · e3194660
      Gabor Greif authored
    • Simon Peyton Jones's avatar
      Perf improvements in T6048, T10547 · 90a65ad0
      Simon Peyton Jones authored
      I think this wave of commits just made these two a little better;
      they must have been close to the threshold before.
    • Simon Peyton Jones's avatar
      Remove redundant kind check · 4431e48e
      Simon Peyton Jones authored
      The invariants for CTyEqCan mean that this check isn't needed.
      Turn it into an ASSERT.
    • Simon Peyton Jones's avatar
      Allow TyVars in TcTypes · 18d0bdd3
      Simon Peyton Jones authored
      Up to now we've had a rule that a TyVar can't apppear in a type
      seen by the type checker; they should all be TcTyVars.  But:
      a) With -XTypeInType it becomes much harder to exclude them;
         see Note [TcTyVars in the typechecker] in TcType.
      b) It's unnecessary to exculde them; instead we can just treat
         a TyVar just like vanillaSkolemTv.
      This is what was causing an ASSERT error in
      indexed-types/should_fail/T12041, reported in Trac #12826.
      That patch allows a TyVar in a TcType.  The most significant
      change is to make Var.tcTyVarDetails return vanillaSkolemTv.
      In fact it already did, but (a) it was not documented, and
      (b) we never exploited it.  Now we rely on it.
    • Simon Peyton Jones's avatar
      Another major constraint-solver refactoring · 1eec1f21
      Simon Peyton Jones authored
      This patch takes further my refactoring of the constraint
      solver, which I've been doing over the last couple of months
      in consultation with Richard.
      It fixes a number of tricky bugs that made the constraint
      solver actually go into a loop, including
        Trac #12526
        Trac #12444
        Trac #12538
      The main changes are these
      * Flatten unification variables (fmvs/fuvs) appear on the LHS
        of a tvar/tyvar equality; thus
                 fmv ~ alpha
        and not
                 alpha ~ fmv
        See Note [Put flatten unification variables on the left]
        in TcUnify.  This is implemented by TcUnify.swapOverTyVars.
      * Don't reduce a "loopy" CFunEqCan where the fsk appears on
        the LHS:
            F t1 .. tn ~ fsk
        where 'fsk' is free in t1..tn.
        See Note [FunEq occurs-check principle] in TcInteract
        This neatly stops some infinite loops that people reported;
        and it allows us to delete some crufty code in reduce_top_fun_eq.
        And it appears to be no loss whatsoever.
        As well as fixing loops, ContextStack2 and T5837 both terminate
        when they didn't before.
      * Previously we generated "derived shadow" constraints from
        Wanteds, but we could (and sometimes did; Trac #xxxx) repeatedly
        generate a derived shadow from the same Wanted.
        A big change in this patch is to have two kinds of Wanteds:
           [WD] behaves like a pair of a Wanted and a Derived
           [W]  behaves like a Wanted only
        See CtFlavour and ShadowInfo in TcRnTypes, and the ctev_nosh
        field of a Wanted.
        This turned out to be a lot simpler.  A [WD] gets split into a
        [W] and a [D] in TcSMonad.maybeEmitShaodow.
        See TcSMonad Note [The improvement story and derived shadows]
      * Rather than have a separate inert_model in the InertCans, I've
        put the derived equalities back into inert_eqs.  We weren't
        gaining anything from a separate field.
      * Previously we had a mode for the constraint solver in which it
        would more aggressively solve Derived constraints; it was used
        for simplifying the context of a 'deriving' clause, or a 'default'
        delcaration, for example.
        But the complexity wasn't worth it; now I just make proper Wanted
        constraints.  See TcMType.cloneWC
      * Don't generate injectivity improvement for Givens; see
        Note [No FunEq improvement for Givens] in TcInteract
      * solveSimpleWanteds leaves the insolubles in-place rather than
        returning them.  Simpler.
      I also did lots of work on comments, including fixing Trac #12821.
    • Simon Peyton Jones's avatar
      Add elemDVarEnv · 0123efde
      Simon Peyton Jones authored
      I need this in a later patch
    • Simon Peyton Jones's avatar
      Comments only in TcType · f04f1188
      Simon Peyton Jones authored
    • Simon Peyton Jones's avatar
      Fix a bug in mk_superclasses_of · 0476a64e
      Simon Peyton Jones authored
      This bug meant that we were less eager about expanding
      tuple superclasses than we should have been; i.e. we stopped
      too soon.  That's not fatal, beause we expand more superclasses
      later, but it's less efficient.
    • Simon Peyton Jones's avatar
      Make a panic into an ASSERT · 9a431e51
      Simon Peyton Jones authored
  2. 24 Nov, 2016 2 commits
  3. 23 Nov, 2016 1 commit
    • Alexander Vershilov's avatar
      Allow to unregister threadWaitReadSTM action. · f4302534
      Alexander Vershilov authored and Ben Gamari's avatar Ben Gamari committed
      Allow to unregister threadWaitReadSTM/threadWaitWriteSTM on
      a non-threaded runtime. Previosly noop action was returned,
      as a result it was not possible to unregister action, unless
      data arrives to Fd or it's closed.
      Fixes #12852.
      Reviewers: simonmar, hvr, austin, bgamari, trofi
      Reviewed By: bgamari, trofi
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D2729
      GHC Trac Issues: #12852
  4. 22 Nov, 2016 2 commits
  5. 21 Nov, 2016 8 commits
  6. 20 Nov, 2016 1 commit
  7. 18 Nov, 2016 5 commits
    • Matthew Pickering's avatar
      Optimise whole module exports · 4b72f859
      Matthew Pickering authored
      We directly build up the correct AvailInfos rather than generating
      lots of singleton instances and combining them with expensive calls to
      There are two other small changes.
      * Pushed the nubAvails call into the explicit export list
        branch as we construct them correctly and uniquely ourselves.
      * fix_faminst only needs to check the first element of the export
        list as we maintain the (yucky) invariant that the parent is the
        first thing in it.
      Reviewers: simonpj, austin, bgamari
      Reviewed By: simonpj, bgamari
      Subscribers: simonpj, thomie, niteria
      Differential Revision: https://phabricator.haskell.org/D2657
      GHC Trac Issues: #12754
    • Ryan Scott's avatar
      Add Data instance for Const · 3bd1dd4d
      Ryan Scott authored
      Fixes #12438. As discussed on the Haskell libraries mailing list here:
      Reviewers: hvr, austin, bgamari
      Reviewed By: bgamari
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D2726
      GHC Trac Issues: #12438
    • Gabor Greif's avatar
      Spelling in comment only · d328abc8
      Gabor Greif authored
    • Tamar Christina's avatar
      Add missing SMP symbols to RT linker. · 94d1221c
      Tamar Christina authored
      Add some missing symbols that we
      export from the public headers but forgot to include
      in the runtime linker's symbol table.
      This is a bit of a unsatifactory patch, since we have a bit of a
      cat and mouse game going. We should find a way to automate this.
      But I know of no good solutions at the moment that won't add all
      rts symbols (including those we don't have an extern declaration for.).
      So for now, just add the ones reported missing.
      Test Plan: inplace/bin/ghc-stage2.exe --interactive
      Reviewers: RyanGlScott, austin, erikd, simonmar, bgamari
      Reviewed By: bgamari
      Subscribers: thomie, #ghc_windows_task_force
      Differential Revision: https://phabricator.haskell.org/D2727
      GHC Trac Issues: #12846
    • Erik de Castro Lopo's avatar
      Switch to LLVM version 3.9 · 9c39e09a
      Erik de Castro Lopo authored
      Test Plan:
      Build and test on x86_64/linux (perf-llvm) and armhf/linux.
      Reviewers: austin, hvr, bgamari
      Reviewed By: bgamari
      Subscribers: RyanGlScott, thomie
      Differential Revision: https://phabricator.haskell.org/D2719
  8. 17 Nov, 2016 10 commits