1. 22 Dec, 2014 5 commits
  2. 21 Dec, 2014 2 commits
  3. 20 Dec, 2014 2 commits
  4. 19 Dec, 2014 5 commits
  5. 18 Dec, 2014 3 commits
  6. 17 Dec, 2014 8 commits
    • Gabor Greif's avatar
      Minor typo in comment · 98686223
      Gabor Greif authored
      98686223
    • eir@cis.upenn.edu's avatar
      Performance enhancements in TcFlatten. · 922168fd
      eir@cis.upenn.edu authored
      This commit fixes some performance regressions introduced by 0cc47eb9,
      adding more `Coercible` magic to the solver. See Note
      [flatten_many performance] in TcFlatten for more info.
      
      The improvements do not quite restore the old numbers. Given that
      the solver is really more involved now, I am accepting this regression.
      
      The way forward (I believe) would be to have *two* flatteners: one
      that deals only with nominal equalities and thus never checks roles,
      and the more general one. A nice design of keeping this performant
      without duplicating code eludes me, but someone else is welcome
      to take a stab.
      922168fd
    • Simon Peyton Jones's avatar
      Wibble error message · ea22a8f7
      Simon Peyton Jones authored
      ea22a8f7
    • Simon Peyton Jones's avatar
      Fix egregious bug in the new canonicalisation code for AppTy · 517908fc
      Simon Peyton Jones authored
      Fixes Trac #9892.
      
      Must form part of 7.10.1
      517908fc
    • Simon Peyton Jones's avatar
      Comment in test · 2469f854
      Simon Peyton Jones authored
      2469f854
    • Simon Peyton Jones's avatar
      Improve TidyPgm.hasCafRefs to account for Integer literals (Trac #8525) · 6b11bab6
      Simon Peyton Jones authored
      See Note [Disgusting computation of CafRefs] in TidyPgm.
      
      Also affects CoreUtils.rhsIsStatic.
      
      The real solution here is to compute CAF and arity information
      from the STG-program, and feed it back to tidied program for
      the interface file and later GHCi clients.  A battle for another
      day.
      
      But at least this commit reduces the number of gratuitous CAFs, and
      hence SRT entries.  And kills off a batch of ASSERT failures.
      6b11bab6
    • Simon Peyton Jones's avatar
      Fix the scope-nesting for arrows · f50d62bb
      Simon Peyton Jones authored
      Previously we were capturing the *entire environment* when moving under
      a 'proc', for the newArrowScope/escapeArrowScope thing.  But that a blunderbuss,
      and in any case isn't right (the untouchable-type-varaible invariant gets
      invalidated).
      
      So I fixed it to be much more refined: just the LocalRdrEnv and constraints are
      captured.
      
      I think this is right; but if not we should just add more fields to ArrowCtxt,
      not return to the blunderbuss.
      
      This patch fixes the ASSERT failure in Trac #5267
      f50d62bb
    • Gabor Greif's avatar
      Typos in comments · c9a02287
      Gabor Greif authored
      c9a02287
  7. 16 Dec, 2014 4 commits
  8. 15 Dec, 2014 3 commits
    • thomasw's avatar
      Fix panic on [t| _ |] (Trac #9879) · 48222831
      thomasw authored
      Summary:
      Type brackets containing a wildcard, e.g. `[t| _ |]`, caused a panic.
      Fix it by disallowing wildcards in type brackets.
      
      Together with D572, this fixes #9879.
      
      Test Plan: new test WildcardInTypeBrackets should pass
      
      Reviewers: austin
      
      Reviewed By: austin
      
      Subscribers: carter, thomie, monoidal
      
      Differential Revision: https://phabricator.haskell.org/D573
      
      GHC Trac Issues: #9879
      48222831
    • Carter Schonwald's avatar
      Changing prefetch primops to have a `seq`-like interface · f44333ea
      Carter Schonwald authored
      Summary:
      The current primops for prefetching do not properly work in pure code;
      namely, the primops are not 'hoisted' into the correct call sites based
      on when arguments are evaluated. Instead, they should use a `seq`-like
      interface, which will cause it to be evaluated when the needed term is.
      
      See #9353 for the full discussion.
      
      Test Plan: updated tests for pure prefetch in T8256 to reflect the design changes in #9353
      
      Reviewers: simonmar, hvr, ekmett, austin
      
      Reviewed By: ekmett, austin
      
      Subscribers: merijn, thomie, carter, simonmar
      
      Differential Revision: https://phabricator.haskell.org/D350
      
      GHC Trac Issues: #9353
      f44333ea
    • Simon Peyton Jones's avatar
      Pattern-synonym matcher and builder Ids must be *LocalIds* · fbb42b2e
      Simon Peyton Jones authored
      This easy-to-make mistake meant that pattern-synonym matcher and
      builder Ids weren't being treated as locally defined by the simpplier.
      That meant that we never looked up them up in the environment, got an
      out-of-date unfolding, which made the Simplifier fall into an infinite
      loop.  This was the cause of Trac #98587, but it was quite tricky to
      find!
      
      In a separate patch I'll make Lint check for locally-bound GlobalIds,
      since they are always an error.
      fbb42b2e
  9. 14 Dec, 2014 4 commits
  10. 12 Dec, 2014 1 commit
    • eir@cis.upenn.edu's avatar
      Rewrite `Coercible` solver · 0cc47eb9
      eir@cis.upenn.edu authored
      Summary:
      This is a rewrite of the algorithm to solve for Coercible "instances".
      
      A preliminary form of these ideas is at
      https://ghc.haskell.org/trac/ghc/wiki/Design/NewCoercibleSolver
      
      The basic idea here is that the `EqPred` constructor of `PredTree`
      now is parameterised by a new type `EqRel` (where
      `data EqRel = NomEq | ReprEq`). Thus, every equality constraint can
      now talk about nominal equality (the usual case) or representational
      equality (the `Coercible` case).
      
      This is a change from the previous
      behavior where `Coercible` was just considered a regular class with
      a special case in `matchClassInst`.
      
      Because of this change, representational equalities are now
      canonicalized just like nominal ones, allowing more equalities
      to be solved -- in particular, the case at the top of #9117.
      
      A knock-on effect is that the flattener must be aware of the
      choice of equality relation, because the inert set now stores
      both representational inert equalities alongside the nominal
      inert equalities. Of course, we can use representational equalities
      to rewrite only within another representational equality --
      thus the parameterization of the flattener.
      
      A nice side effect of this change is that I've introduced a new
      type `CtFlavour`, which tracks G vs. W vs. D, removing some ugliness
      in the flattener.
      
      This commit includes some refactoring as discussed on D546.
      It also removes the ability of Deriveds to rewrite Deriveds.
      
      This fixes bugs #9117 and #8984.
      
      Reviewers: simonpj, austin, nomeata
      
      Subscribers: carter, thomie
      
      Differential Revision: https://phabricator.haskell.org/D546
      
      GHC Trac Issues: #9117, #8984
      0cc47eb9
  11. 11 Dec, 2014 3 commits
    • Simon Peyton Jones's avatar
      32-bit performance changes following constraint solver improvements · 058262ba
      Simon Peyton Jones authored
      Things get faster, except T5030
      058262ba
    • Simon Peyton Jones's avatar
      Fix an obscure but terrible bug in the simplifier (Trac #9567) · b8392ae7
      Simon Peyton Jones authored
      The issue was that contInputType simply gave the wrong answer
      for type applications.
      
      There was no way to fix contInputType; it just didn't have enough
      information.  So I did this:
      
      * Split the ApplyTo constructor of SimplUtils.SimplCont into
            ApplyToVal
            ApplyToTy
        I used record syntax for them; we should do this for some
        of the other constructors too.
      
      * The latter carries a sc_hole_ty, which is the type of the
        continuation's "hole"
      
      * Maintaining this type meant that I had do to something
        similar for SimplUtils.ArgSpec.
      
      * I renamed contInputType to contHoleType for consistency.
      
      * I did a bit of refactoring around the call to tryRules
        in Simplify, which was jolly confusing before.
      
      The resulting code is quite nice now.  And it has the additional
      merit that it works.
      
      The tests are simply tc124 and T7891 with -O enabled.
      b8392ae7
    • Simon Peyton Jones's avatar
      Test Trac #9090 · 8c825633
      Simon Peyton Jones authored
      8c825633