1. 01 Mar, 2017 9 commits
    • David Feuer's avatar
      Change catch# demand signature · 701256df
      David Feuer authored
      * Give `catch#` a lazy demand signature, to make it more honest.
      
      * Make `catchException` and `catchAny` force their arguments so they
      actually behave as advertised.
      
      * Use `catch` rather than `catchException` in `forkIO`, `forkOn`, and
      `forkOS` to avoid losing exceptions.
      
      Fixes #13330
      
      Reviewers: rwbarton, simonpj, simonmar, bgamari, hvr, austin
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D3244
      701256df
    • Ben Gamari's avatar
      rts: Fix build · b86d226f
      Ben Gamari authored
      I evidently neglected to consider that validate doesn't build profiled
      ways. Arg.
      b86d226f
    • David Feuer's avatar
      Update containers again · 916658d6
      David Feuer authored
      submodule update
      
      Get the version with `COMPLETE` pragmas for `Data.Sequence`.
      
      Reviewers: austin, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D3249
      916658d6
    • Simon Peyton Jones's avatar
      Move isJoinId, isJoinId_maybe to Id · 2ab6ce78
      Simon Peyton Jones authored
      This is just a refactoring, moving these two functions where
      they belong.
      
      The reason they were there was because of the use of isJoinId_maybe
      in the OutputableBndr instance of TaggedBndr, which was in CoreSyn.
      I moved it to PprCore, to join the OutputableBndr instance for
      Var.  That makes more sense anyway.
      
      Reviewers: austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D3207
      2ab6ce78
    • Simon Peyton Jones's avatar
      Mark non-recursive join lambdas as one-shot · 777b7707
      Simon Peyton Jones authored
      When we have
      
        join j x y = rhs in ...
      
      we know that the lambdas for 'x' and 'y' are one-shot.
      Let's mark them as such!
      
      This doesn't fix a specific bug, but it feels right to me.
      
      Reviewers: austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: lukemaurer, thomie
      
      Differential Revision: https://phabricator.haskell.org/D3196
      777b7707
    • Simon Peyton Jones's avatar
      Improve SetLevels for join points · 6eb52cfc
      Simon Peyton Jones authored
      C.f. Trac #13286, #13236
      
      * Never destroy a join point unless it goes to top level
        See Note [Floating join point bindings]
      
      * Never float a MFE if it has a free join variable
        Note [Free join points]
      
      * Stop treating nullary join points specially
      
      * Enforce the invariant that le_join_ceil >= le_ctxt_lvl
        (Needs more thought...)
      
      Reviewers: austin, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D3199
      6eb52cfc
    • Simon Peyton Jones's avatar
      Improve pretty-printing of types · 871b63e4
      Simon Peyton Jones authored
      When doing debug-printing it's really important that the free vars
      of a type are printed with their uniques.  The IfaceTcTyVar thing
      was a stab in that direction, but it only worked for TcTyVars, not
      TyVars.
      
      This patch does it properly, by keeping track of the free vars of the
      type when translating Type -> IfaceType, and passing that down through
      toIfaceTypeX.  Then when we find a variable, look in that set, and
      translate it to IfaceFreeTyVar if so.  (I renamed IfaceTcTyVar to
      IfaceFreeTyVar.)
      
      Fiddly but not difficult.
      
      Reviewers: austin, goldfire, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D3201
      871b63e4
    • Simon Peyton Jones's avatar
      Add VarSet.anyDVarSet, allDVarSet · cdf6b695
      Simon Peyton Jones authored
      I need these in a later commit.
      
      Also rename
        varSetAny  -->  anyVarSet
        varSetAll  -->  allVarSet
      for consistency with other functions; eg filterVarSet
      
      Reviewers: austin, goldfire, bgamari
      
      Subscribers: niteria, thomie
      
      Differential Revision: https://phabricator.haskell.org/D3202
      cdf6b695
    • David Feuer's avatar
      Fix redundant import in CSE · 4f10a229
      David Feuer authored
      4f10a229
  2. 28 Feb, 2017 23 commits
  3. 27 Feb, 2017 7 commits
    • Simon Peyton Jones's avatar
      Stop uniques ending up in SPEC rule names · 0f7a369f
      Simon Peyton Jones authored
      Reviewers: austin, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D3191
      0f7a369f
    • Alan Zimmerman's avatar
      Explicitly capture whether a splice has a dollar prefix · c0af206f
      Alan Zimmerman authored
      A top-level splice can be written
      
          $splice
      
      or
      
          splice
      
      For accurate pretty-printing, and for ghc-exactprint, capture in the hsSyn AST
      which variant was parsed.
      c0af206f
    • Simon Peyton Jones's avatar
      Occurrence-analyse the result of rule firings · 76f2cd02
      Simon Peyton Jones authored
      When studying simplCore/should_compile/T7785 I found that a long
      chain of maps
      
        map f (map f (map f (map f (...))))
      
      took an unreasonably long time to simplify.  The problem got
      worse when I started inlining in the InitialPhase, which is how
      I stumbled on it.
      
      The solution turned  out to be rather simple.  It's described in
      
         Note [Occurence-analyse after rule firing]
      
      in Simplify.hs
      
      Reviewers: austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D3190
      76f2cd02
    • Simon Peyton Jones's avatar
      Add -fspec-constr-keen · 4f38fa10
      Simon Peyton Jones authored
      I discovered that the dramatic imprvoement in perf/should_run/T9339
      with the introduction of join points was really rather a fluke, and
      very fragile.
      
      The real problem (see Note [Making SpecConstr keener]) is that
      SpecConstr wasn't specialising a function even though it was applied
      to a freshly-allocated constructor.  The paper describes plausible
      reasons for this, but I think it may well be better to be a bit more
      aggressive.
      
      So this patch add -fspec-constr-keen, which makes SpecConstr a bit
      keener to specialise, by ignoring whether or not the argument
      corresponding to a call pattern is scrutinised in the function body.
      Now the gains in T9339 should be robust; and it might even be a
      better default.
      
      I'd be interested in what happens if we switched on -fspec-constr-keen
      with -O2.
      
      Reviewers: austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D3186
      4f38fa10
    • Simon Peyton Jones's avatar
      Refactor floating of bindings (fiBind) · e4188b53
      Simon Peyton Jones authored
      This is just a local refactoring.
      
      I originally planned to try floating top-level bindings inwards,
      but I backed off from that leaving only this (harmless) refactoring,
      which has no behavioural effect.
      
      I also make FloatIn into a ModGuts -> ModGuts function; again not
      necessary now, but no harm either.
      
      My attempt also used the new function CoreFVs.freeVarsBind; but
      that too is a plausible refactorig of freeVars, so I left it in too.
      
      Reviewers: austin, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D3180
      e4188b53
    • Edward Z. Yang's avatar
      Subtyping for roles in signatures. · 923d7ca2
      Edward Z. Yang authored
      Summary:
      This commit implements the plan in #13140
      
      :
      
      * Today, roles in signature files default to representational. Let's change the
        default to nominal, as this is the most flexible implementation side. If a
        client of the signature needs to coerce with a type, the signature can be
        adjusted to have more stringent requirements.
      
      * If a parameter is declared as nominal in a signature, it can be implemented
        by a data type which is actually representational.
      
      * When merging abstract data declarations, we take the smallest role for every
        parameter. The roles are considered fix once we specify the structure of an
        ADT.
      
      * Critically, abstract types are NOT injective, so we aren't allowed to
        make inferences like "if T a ~R T b, then a ~N b" based on the nominal
        role of a parameter in an abstract type (this would be unsound if the
        parameter ended up being phantom.)  This restriction is similar to the
        restriction we have on newtypes.
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      
      Test Plan: validate
      
      Reviewers: simonpj, bgamari, austin, goldfire
      
      Subscribers: goldfire, thomie
      
      Differential Revision: https://phabricator.haskell.org/D3123
      923d7ca2
    • Edward Z. Yang's avatar
      Treat all TyCon with hole names as skolem abstract. · 9603de6a
      Edward Z. Yang authored
      Summary:
      Fixes #13335
      
      .
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      
      Test Plan: validate
      
      Reviewers: goldfire, austin, simonpj, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D3211
      9603de6a
  4. 26 Feb, 2017 1 commit