1. 12 Feb, 2016 3 commits
  2. 11 Feb, 2016 6 commits
  3. 10 Feb, 2016 2 commits
  4. 09 Feb, 2016 5 commits
  5. 08 Feb, 2016 15 commits
    • Ömer Sinan Ağacan's avatar
      Remove unused LiveVars and SRT fields of StgCase · 023fc92f
      Ömer Sinan Ağacan authored
      We also need to update `stgBindHasCafRefs` assertion with this change,
      as we no longer have the pre-computed SRT, LiveVars etc. We rename it to
      `topStgBindHasCafRefs` and implement it like this:
      
      A non-updatable top-level binding may refer to a CAF by referring to a
      top-level definition with CAFs. A top-level definition may have CAFs if
      it's updatable. At this point (because this is done after TidyPgm)
      top-level Ids (whether imported or defined in this module) are
      GlobalIds, so the top-levelness test is easy. (see also comments in the
      code)
      
      Reviewers: bgamari, simonpj, austin
      
      Reviewed By: simonpj
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1889
      
      GHC Trac Issues: #11550
      023fc92f
    • Simon Peyton Jones's avatar
      Define tyConRolesRepresentational and use it · 489a9a3b
      Simon Peyton Jones authored
      tyConRolesRepresentational is just a version of tyConRolesX, but
      specialised for a Representational argument. Saves a bit of extra
      argument passing and pattern matching, and tyConRolesX was often
      called when we knew the argument role was Representational.
      
      Rather to my surprise this made the compiler allocate 5% less
      for tests T9872{b,c,d}.  At least I think it's this commit.
      Good thing, regardless.
      489a9a3b
    • Simon Peyton Jones's avatar
      Define mkTvSubst, and use it · fac0efc3
      Simon Peyton Jones authored
         mkTvSubst :: InScopeSet -> TvSubstEnv -> TCvSubst
      produces a TCvSubst with an empty CvSubstEnv
      fac0efc3
    • Simon Peyton Jones's avatar
      Some tiding up in TcGenDeriv · 96d45145
      Simon Peyton Jones authored
      ..around newtype deriving instances.
      
      See esp the new Note [Newtype-deriving instances]
      
      No change in behaviour
      96d45145
    • Simon Peyton Jones's avatar
      Fix a nasty superclass expansion bug · 43e02d12
      Simon Peyton Jones authored
      This patch fixes Trac #11523.
      
      * The basic problem was that TcRnTypes.superClassesMightHelp was
        returning True of a Derived constraint, and that led to us
        expanding Given superclasses, which produced the same Derived
        constraint again, and so on infinitely.  We really want to do
        this only if there are unsolve /Wanted/ contraints!
      
      * On the way I made TcSMonad.getUnsolvedInerts a bit more
        discriminating about which Derived equalities it returns;
        see Note [Unsolved Derived equalities] in TcSMonad
      
      * Lots of new comments in TcSMonad.
      43e02d12
    • Simon Peyton Jones's avatar
    • Simon Peyton Jones's avatar
      Use runTcSDeriveds for simplifyDefault · f79b9ec9
      Simon Peyton Jones authored
      This is a small refactoring, no change in behaviour.
      f79b9ec9
    • Simon Peyton Jones's avatar
      Improve error messages for recursive superclasses · d6b68be1
      Simon Peyton Jones authored
      If we fail to typecheck by blowing the constraint simplifier
      iteration limit, we want to see the limit-blowing meessage.
      Previously it was being suppressed by the type /error/, which
      suppress the iteration-limit /warning/.  Solution: make the
      iteration-limit message into an error.
      d6b68be1
    • Simon Peyton Jones's avatar
      Improve tracing in TcInteract · 72129686
      Simon Peyton Jones authored
      72129686
    • Simon Peyton Jones's avatar
      Comment out some traceFlat calls · e72665b5
      Simon Peyton Jones authored
      They were excessively verbose.  I've commented them out rather than
      deleting so that they can easily be restored.
      e72665b5
    • Simon Peyton Jones's avatar
      Document and improve superclass expansion · 8871737d
      Simon Peyton Jones authored
      When investigating Trac #11523 I found that superclass
      expansion was a little over-aggressive; we were sort of
      unrolling each loop twice.
      
      This patch corrects that, and adds explanatory comments.
      8871737d
    • Simon Peyton Jones's avatar
      White space and comments only · ee11a84c
      Simon Peyton Jones authored
      ee11a84c
    • Simon Peyton Jones's avatar
      6036cb6f
    • Simon Peyton Jones's avatar
      Allow foralls in instance decls · 2cf3cac6
      Simon Peyton Jones authored
      This patch finally makes it possible to have explicit
      foralls in an instance decl
         instance forall (a :: *). Eq a => Eq [a] where ...
      
      This is useful to allow kind signatures or indeed
      explicicit kind for-alls; see Trac #11519
      
      I thought it would be really easy, because an instance
      declaration already contains an actual HsSigType, so all
      the syntactic baggage is there.  But in fact it turned
      out that instance declarations were kind-checked a
      little differently, because the body kind of the forall
      is 'Constraint' rather than '*'.
      
      So I fixed that.  There a slight kludge
      (see Note [Body kind of a HsQualTy], but it's still a
      significant improvement.
      
      I also did the usual other round of refactoring,
      improved a few error messages, tidied up comments etc.
      The only significant aspect of all that was
      
        * Kill mkNakedSpecSigmaTy, mkNakedPhiTy, mkNakedFunTy
          These function names suggest that they do something
          complicated, but acutally they do nothing. So I
          killed them.
      
        * Swap the arg order of mkNamedBinder, just so that it is
          convenient to say 'map (mkNamedBinder Invisible) tvs'
      
        * I had to improve isPredTy, to deal with (illegal)
          types like
             (Eq a => Eq [a]) => blah
          See Note [isPeredTy complications] in Type.hs
      
      Still to come: user manual documentation for the
      instance-decl change.
      2cf3cac6
    • Simon Peyton Jones's avatar
      Remove unused export from TcUnify · 8263d09e
      Simon Peyton Jones authored
      ..namely buildImplication.
      
      Plus white space in TcDeriv
      8263d09e
  6. 07 Feb, 2016 1 commit
  7. 05 Feb, 2016 1 commit
  8. 04 Feb, 2016 3 commits
    • Ömer Sinan Ağacan's avatar
      Remove unused LiveVars and SRT fields of StgCase and StgLetNoEscape · 4f9967aa
      Ömer Sinan Ağacan authored
      Also remove the functions and types that became useless after removing
      the fields:
      
      - SRT functions
      - LiveInfo type and functions
      - freeVarsToLiveVars
      - unariseLives and unariseSRT
      
      Reviewers: bgamari, simonpj, austin
      
      Reviewed By: simonpj
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1880
      4f9967aa
    • Ben Gamari's avatar
      Fix a few loose ends from D1795 · bbc0ec57
      Ben Gamari authored
      George updated the Diff but I didn't noticed until it was too late.
      bbc0ec57
    • Georgios Karachalias's avatar
      Overhaul the Overhauled Pattern Match Checker · 28f951ed
      Georgios Karachalias authored
      Overhaul the Overhauled Pattern Match Checker
      
      * Changed the representation of Value Set Abstractions. Instead of
      using a prefix tree, we now use a list of Value Vector Abstractions.
      The set of constraints Delta for every Value Vector Abstraction is the
      oracle state so that we solve everything only once.
      
      * Instead of doing everything lazily, we prune at once (and in general
      everything is much stricter). Hence, an example written with pattern
      guards is checked in almost the same time as the equivalent with
      pattern matching.
      
      * Do not store the covered and the divergent sets at all. Since what we
      only need is a yes/no (does this clause cover anything? Does it force
      any thunk?) We just keep a boolean for each.
      
      * Removed flags `-Wtoo-many-guards` and `-ffull-guard-reasoning`.
      Replaced with `fmax-pmcheck-iterations=n`. Still debatable what should
      the default `n` be.
      
      * When a guard is for sure not going to contribute anything, we treat
      it as such: The oracle is not called and cases `CGuard`, `UGuard` and
      `DGuard` from the paper are not happening at all (the generation of a
      fresh variable, the unfolding of the pattern list etc.). his combined
      with the above seems to be enough to drop the memory increase for test
      T783 down to 18.7%.
      
      * Do not export function `dsPmWarn` (it is now called directly from
      within `checkSingle` and `checkMatches`).
      
      * Make `PmExprVar` hold a `Name` instead of an `Id`. The term oracle
      does not handle type information so using `Id` was a waste of
      time/space.
      
      * Added testcases T11195, T11303b (data families) and T11374
      
      The patch addresses at least the following:
      Trac #11195, #11276, #11303, #11374, #11162
      
      Test Plan: validate
      
      Reviewers: goldfire, bgamari, hvr, austin
      
      Subscribers: simonpj, thomie
      
      Differential Revision: https://phabricator.haskell.org/D1795
      28f951ed
  9. 02 Feb, 2016 4 commits
    • Ben Gamari's avatar
      TcMType: Add some elementary notes · 871c96f1
      Ben Gamari authored
      It's astoundingly difficult to find a good description of zonking. Given
      that there is a Stack Overflow question on the matter, I'm clearly not
      the only one who feels this way. Hopefully this will clarify the issue.
      
      Test Plan: Read it
      
      Reviewers: goldfire, austin, simonpj
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1859
      871c96f1
    • niteria's avatar
      Use a correct substitution in tcCheckPatSynDecl · 07ed2413
      niteria authored
      The `substTheta` call didn't have the free variables of the
      `prov_theta` in the `in_scope` set. It should be enough to add
      `univ_tvs`, as all the `ex_tvs` are already in the domain of
      the substitution.
      
      Test Plan: added a testcase
      
      Reviewers: simonpj, bgamari, goldfire, austin
      
      Reviewed By: simonpj, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1879
      
      GHC Trac Issues: #11524
      07ed2413
    • Simon Marlow's avatar
      Remote GHCi: parallelise BCO serialization · c996db5b
      Simon Marlow authored
      Summary:
      Serialization of BCOs is slow, but we can parallelise it when using
      ghci -j<n>.  It parallelises nicely, saving multiple seconds off the
      link time in a large example I have.
      
      Test Plan:
      * validate
      * `ghci -fexternal-interpreter` in `nofib/real/anna`
      
      Reviewers: niteria, bgamari, ezyang, austin, hvr, erikd
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1877
      
      GHC Trac Issues: #11100
      c996db5b
    • Simon Marlow's avatar
      Remote GHCi: batch the creation of strings · 7cb1fae2
      Simon Marlow authored
      Summary:
      This makes a big performance difference especially when loading a
      large number of modules and using parallel compilation (ghci -jN).
      
      Test Plan:
      * validate
      * `ghci -fexternal-interpreter` in `nofib/real/anna`
      
      Reviewers: niteria, bgamari, ezyang, austin, hvr, erikd
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1876
      
      GHC Trac Issues: #11100
      7cb1fae2