1. 28 Dec, 2016 1 commit
    • Tamar Christina's avatar
      Fix various issues with testsuite code on Windows · a3704409
      Tamar Christina authored
      Summary:
      Previously we would make direct calls to `diff` using `os.system`.
      On Windows `os.system` is implemented using the standard
      idiom `CreateProcess .. WaitForSingleObject ..`.
      
      This again runs afoul with the `_exec` behaviour on Windows. So we ran
      into some trouble where sometimes `diff` would return before it's done.
      
      On tests which run multiple ways, such as `8086` what happens is that
      we think the diff is done and continue. The next way tries to set things
      up again by removing any previous directory. This would then fail with
      and error saying the directory can't be removed. Which is true, because
      the previous diff code/child is still running.
      
      We shouldn't make any external calls to anything using `os.system`.
      Instead just use `runCmd` which uses `timeout`. This also ensures that if
      we hit the cygwin bug where diff or any other utility hangs, we kill it and
      continue and not hang the entire test and leave hanging processes.
      
      Further more we also:
      Ignore error lines from `removeFile` from tools in the testsuite. This is a rather large
      hammer to work around the fact that `hsc2hs` often tries to remove it's own file too early.
      When this is patched the workaround can be removed. See Trac #9775
      
      We mark `prog003` as skip. Since this test randomly fails and passes. For stability it's disabled
      but it is a genuine bug which we should find. It's something with interface files being
      overwritten. See Trac #11317
      
      when `rmtree` hits a readonly file, the `onerror` handler is raised afterwards but not
      during the tree walk. It doesn't allow you to recover and continue as we thought.
      Instead you have to explicitly start again. This is why sometimes even though we
      call `cleanup` before `os.mkdirs`, it would sometimes fail with an error that the
      folder already exists. So we now do a second walk.
      
      A new verbosity level (4) will strip the silent flags from `MAKE` invocations so you can actually
      see what's going on.
      
      Test Plan: ./validate on build bots.
      
      Reviewers: bgamari, austin
      
      Reviewed By: bgamari
      
      Subscribers: mpickering, thomie, #ghc_windows_task_force
      
      Differential Revision: https://phabricator.haskell.org/D2894
      
      GHC Trac Issues: #12661, #11317, #9775
      a3704409
  2. 27 Dec, 2016 4 commits
  3. 26 Dec, 2016 3 commits
    • Joachim Breitner's avatar
      CallArity: Use exprIsCheap to detect thunks · 815099cc
      Joachim Breitner authored
      Originally, everything that is not in WHNF (`exprIsWHNF`) is considered
      a thunk, not eta-expanded, to avoid losing any sharing. This is also how
      the published papers on Call Arity describe it.
      
      In practice, there are thunks that do a just little work, such as
      pattern-matching on a variable, and the benefits of eta-expansion likely
      oughtweigh the cost of doing that repeatedly. Therefore, this
      implementation of Call Arity considers everything that is not cheap
      (`exprIsCheap`) as a thunk.
      
      Nofib reports -2.58% allocations for scs and -40.93% allocation for
      wheel-sieve1; the latter has - 2.92% runtime.
      815099cc
    • Matthew Pickering's avatar
      Remove redudant import from check-ppr · 3c9fbbac
      Matthew Pickering authored
      3c9fbbac
    • Ben Gamari's avatar
      check-ppr: Make --dump the default behavior · 9331e338
      Ben Gamari authored
      9331e338
  4. 23 Dec, 2016 20 commits
  5. 22 Dec, 2016 2 commits
  6. 21 Dec, 2016 10 commits
    • Edward Z. Yang's avatar
      Notes on parsing lists in Parser.y · 46f7f31f
      Edward Z. Yang authored
      
      
      Summary:
      Maybe everyone knows this but I think it is worth mentioning
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      
      Test Plan: none
      
      Reviewers: bgamari, austin
      
      Subscribers: thomie, mpickering
      
      Differential Revision: https://phabricator.haskell.org/D2890
      46f7f31f
    • Edward Z. Yang's avatar
      Update ghc-cabal command line usage text. · 99db12f5
      Edward Z. Yang authored
      
      
      Summary:
      Old usage text was horribly out-of-date.  Now updated!
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      
      Test Plan: none
      
      Reviewers: bgamari, austin
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2889
      99db12f5
    • Edward Z. Yang's avatar
      Support for abi-depends for computing shadowing. · ee4e1654
      Edward Z. Yang authored
      
      
      Summary:
      This is a complete fix based off of
      ed7af26606b3a605a4511065ca1a43b1c0f3b51d for handling
      shadowing and out-of-order -package-db flags simultaneously.
      
      The general strategy is we first put all databases together,
      overriding packages as necessary.  Once this is done, we successfully
      prune out broken packages, including packages which depend on a package
      whose ABI differs from the ABI we need.
      
      Our check gracefully degrades in the absence of abi-depends, as
      we only check deps which are recorded in abi-depends.
      
      Contains time and Cabal submodule update.
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      
      Test Plan: validate
      
      Reviewers: niteria, austin, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2846
      
      GHC Trac Issues: #12485
      ee4e1654
    • Ryan Scott's avatar
      Disambiguate two Notes with identical names · 21892398
      Ryan Scott authored
      It turns out there were two Notes in the GHC codebase named
      [Pattern synonym signatures]. To avoid confusion, I gave one Note a slightly
      different name.
      21892398
    • Ryan Scott's avatar
      Fix a forward reference to a Note · ccc918cd
      Ryan Scott authored
      ccc918cd
    • Simon Peyton Jones's avatar
      Improved perf for T12227 · 74033c46
      Simon Peyton Jones authored
      Improved compiler allocations by abut 5%.  It comes from one of
      
      1a4c04b1 Fix 'SPECIALISE instance'
      c48595ee Never apply worker/wrapper to DFuns
      05d233e8 Move InId/OutId to CoreSyn
      e07ad4db Don't eta-expand in stable unfoldings
      d250d493 Add INLINE pragamas on Traversable default methods
      c66dd05c Move typeSize/coercionSize into TyCoRep
      
      I think d250d493.
      
      But it's good anyway.
      74033c46
    • Simon Peyton Jones's avatar
      Test Trac #12950 · c469db4e
      Simon Peyton Jones authored
      c469db4e
    • Simon Peyton Jones's avatar
      Fix 'SPECIALISE instance' · 1a4c04b1
      Simon Peyton Jones authored
      Trac #12944 showed that the DsBinds code that implemented a
      SPECIALISE pragma was inadequate if the constraints solving
      added let-bindings for dictionaries.  The result was that
      we ended up with an unbound dictionary in a DFunUnfolding -- and
      Lint didn't even check for that!
      
      Fixing this was not entirely straightforward
      
      * In DsBinds.dsSpec we use a new function
           TcEvidence.collectHsWrapBinders
        to pick off the lambda binders from the HsWapper
      
      * dsWrapper now returns a (CoreExpr -> CoreExpr) function
      
      * CoreUnfold.specUnfolding now takes a (CoreExpr -> CoreExpr)
        function it can use to specialise the unfolding.
      
      On the whole the code is simpler than before.
      1a4c04b1
    • Simon Peyton Jones's avatar
      Never apply worker/wrapper to DFuns · c48595ee
      Simon Peyton Jones authored
      While fixing Trac #12444 I found an occasion on which we applied
      worker/wrapper to a DFunId.  This is bad: it destroys the magic
      DFunUnfolding.
      
      This patch is a minor refactoring that stops this corner case
      happening, and tidies up the code a bit too.
      c48595ee
    • Simon Peyton Jones's avatar
      Move InId/OutId to CoreSyn · 05d233e8
      Simon Peyton Jones authored
      It turned out that many different modules defined the same type
      synonyms (InId, OutId, InType, OutType, etc) for the same purpose.
      
      This patch is refactoring only: it moves all those definitions to
      CoreSyn.
      05d233e8