1. 24 Sep, 2016 1 commit
    • Joachim Breitner's avatar
      Replace INLINEABLE by INLINABLE (#12613) · 68f72f10
      Joachim Breitner authored
      as the latter is the official, correct spelling, and the former just a
      misspelling accepted by GHC.
      
      Also document in the user’s guide that the alternative spelling is
      accepted
      
      This commit was brough to you by HIW 2016.
      68f72f10
  2. 23 Sep, 2016 1 commit
    • Richard Eisenberg's avatar
      Fix #12442. · 9766b0c8
      Richard Eisenberg authored
      The problem is described in the ticket.
      
      This patch adds new variants of the access points to the pure
      unifier that allow unification of types only when the caller
      wants this behavior. (The unifier used to also unify kinds.)
      This behavior is appropriate when the kinds are either already
      known to be the same, or the list of types provided are a
      list of well-typed arguments to some type constructor. In the
      latter case, unifying earlier types in the list will unify the
      kinds of any later (dependent) types.
      
      At use sites, I went through and chose the unification function
      according to the criteria above.
      
      This patch includes some modest performance improvements as we
      are now doing less work.
      9766b0c8
  3. 21 Sep, 2016 1 commit
    • Tamar Christina's avatar
      Fix failing test T12504 · 8bd3d417
      Tamar Christina authored
      Summary:
      Test T12504 does it's checking in the Makefile using grep but still specified an stdout.
      the stdout has the old output and would always fail.
      
      Since the stdout isn't needed, let's not check it.
      
      Test Plan: make test TEST=T12504
      
      Reviewers: bgamari, austin, erikd, rcook
      
      Reviewed By: rcook
      
      Subscribers: thomie, #ghc_windows_task_force
      
      Differential Revision: https://phabricator.haskell.org/D2537
      
      GHC Trac Issues: #12504
      8bd3d417
  4. 15 Sep, 2016 2 commits
  5. 12 Sep, 2016 4 commits
    • Simon Peyton Jones's avatar
      Testsuite wibbles, to the same files · ec3edd56
      Simon Peyton Jones authored
      Sigh.  I added some comments to the source files,
      and failed to revalidate.  But the comments change the
      line number in the error messages.  Doh.
      ec3edd56
    • Simon Peyton Jones's avatar
      Test wibbles for commit 03541cba · 5eeabe25
      Simon Peyton Jones authored
      I must have failed to validate properly, sorry.
      These testsuite wibbles belong with
      
        commit 03541cba
        Author: Simon Peyton Jones <simonpj@microsoft.com>
        Date:   Fri Sep 9 17:42:42 2016 +0100
      
            Be less picky about reporing inaccessible code
      5eeabe25
    • Simon Peyton Jones's avatar
      Be less picky about reporing inaccessible code · 03541cba
      Simon Peyton Jones authored
      Triggered by the discussion on Trac #12466, this patch
      makes GHC less aggressive about reporting an error when
      there are insoluble Givens.
      
      Being so agressive was making some libraries fail to
      compile, and is arguably wrong in at least some cases.
      See the discussion on the ticket.
      
      Several test now pass when they failed before; see
      the files-modified list for this patch.
      03541cba
    • Simon Marlow's avatar
      Add hs_try_putmvar() · 454033b5
      Simon Marlow authored
      Summary:
      This is a fast, non-blocking, asynchronous, interface to tryPutMVar that
      can be called from C/C++.
      
      It's useful for callback-based C/C++ APIs: the idea is that the callback
      invokes hs_try_putmvar(), and the Haskell code waits for the callback to
      run by blocking in takeMVar.
      
      The callback doesn't block - this is often a requirement of
      callback-based APIs.  The callback wakes up the Haskell thread with
      minimal overhead and no unnecessary context-switches.
      
      There are a couple of benchmarks in
      testsuite/tests/concurrent/should_run.  Some example results comparing
      hs_try_putmvar() with using a standard foreign export:
      
          ./hs_try_putmvar003 1 64 16 100 +RTS -s -N4     0.49s
          ./hs_try_putmvar003 2 64 16 100 +RTS -s -N4     2.30s
      
      hs_try_putmvar() is 4x faster for this workload (see the source for
      hs_try_putmvar003.hs for details of the workload).
      
      An alternative solution is to use the IO Manager for this.  We've tried
      it, but there are problems with that approach:
      * Need to create a new file descriptor for each callback
      * The IO Manger thread(s) become a bottleneck
      * More potential for things to go wrong, e.g. throwing an exception in
        an IO Manager callback kills the IO Manager thread.
      
      Test Plan: validate; new unit tests
      
      Reviewers: niteria, erikd, ezyang, bgamari, austin, hvr
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2501
      454033b5
  6. 11 Sep, 2016 1 commit
    • Ryan Scott's avatar
      Fix derived Ix instances for one-constructor GADTs · 7b7ea8f4
      Ryan Scott authored
      Summary:
      Standalone-derived `Ix` instances would panic on GADTs with exactly
      one constructor, since the list of fields was being passed to a function that
      uses `foldl1` in order to generate an implementation for `inRange`. This adds a
      simple check that makes `inRange` be `True` whenever a product type has no
      fields.
      
      Fixes #12583.
      
      Test Plan: make test TEST=12583
      
      Reviewers: simonpj, austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2521
      
      GHC Trac Issues: #12583
      7b7ea8f4
  7. 08 Sep, 2016 1 commit
  8. 05 Sep, 2016 6 commits
    • takano-akio's avatar
      Make the test for #11108 less fragile · a7a960e4
      takano-akio authored
      This change should close #11108 by fixing the test case.
      
      This commit fixes two issues:
      
      * Make sure that each weak pointer we allocate has a constructor as the
        key, not a thunk. A failure to do so meant these weak pointers died
        prematurely on the 'ghci' WAY.
      
      * Don't print anything in the finalizer, because they are not guaranteed
        to run.
      
      Test Plan: validate
      
      Reviewers: austin, simonmar, erikd, bgamari
      
      Reviewed By: erikd, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2512
      
      GHC Trac Issues: #11108
      a7a960e4
    • Ryan Scott's avatar
      Derive the Generic instance in perf/compiler/T5642 · 34010dbe
      Ryan Scott authored
      Summary:
      For some inexplicable reason, the `Generic` instance in
      `perf/compiler/T5642` is written out entirely by hand. This is not only
      strange, since Trac #5642 is about derived `Generic` instances, but it also
      annoying to maintain, since it requires manually changing a bunch of code
      whenever the algorithm behind `deriving Generic` changes. (See D2304 for a
      recent example of this.)
      
      It seems more sensible to just derive the `Generic` instance. It shifts the
      goalposts of what allocations we're measuring a bit, since we no longer have
      to parse a large amount of code (and as a knock-on effect, the allocations go
      down a bit). But I think this program is morally equivalent to what we were
      benchmarking before, so it's not too unreasonable to change.
      
      Test Plan: make test TEST=T5642
      
      Reviewers: austin, thomie, bgamari
      
      Reviewed By: bgamari
      
      Differential Revision: https://phabricator.haskell.org/D2511
      
      GHC Trac Issues: #5642
      34010dbe
    • prokhorenkov's avatar
      Make generated Ord instances smaller (per #10858). · 4ff4929c
      prokhorenkov authored
      Reviewers: simonpj, bgamari, RyanGlScott, austin
      
      Reviewed By: simonpj
      
      Subscribers: nomeata, simonpj, thomie
      
      Differential Revision: https://phabricator.haskell.org/D2502
      
      GHC Trac Issues: #10858
      4ff4929c
    • mniip's avatar
      Less scary arity mismatch error message when deriving · 8d00175f
      mniip authored
      Test Plan: Corrected a few tests to include the new message.
      
      Reviewers: goldfire, austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: goldfire, thomie
      
      Differential Revision: https://phabricator.haskell.org/D2484
      
      GHC Trac Issues: #12546
      8d00175f
    • takano-akio's avatar
      Turn divInt# and modInt# into bitwise operations when possible · 6ea62427
      takano-akio authored
      This implements #5615 for divInt# and modInt#.
      
      I also included rules to do constant-folding when the both arguments
      are known.
      
      Test Plan: validate
      
      Reviewers: austin, simonmar, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: hvr, thomie
      
      Differential Revision: https://phabricator.haskell.org/D2486
      
      GHC Trac Issues: #5615
      6ea62427
    • Facundo Domínguez's avatar
      Don't ignore addTopDecls in module finalizers. · 71dd6e44
      Facundo Domínguez authored
      Summary:
      Module finalizer could call addTopDecls, however, the declarations
      added in this fashion were ignored. This patch makes sure to rename,
      type check and incorporate this declarations.
      
      Because a declaration may include a splice which calls addModFinalizer,
      the list of finalizers is repeteadly checked after adding declarations
      until no more finalizers remain.
      
      Test Plan: ./validate
      
      Reviewers: bgamari, goldfire, simonpj, austin
      
      Reviewed By: bgamari, simonpj
      
      Subscribers: simonmar, mboes, thomie
      
      Differential Revision: https://phabricator.haskell.org/D2505
      
      GHC Trac Issues: #12559
      71dd6e44
  9. 04 Sep, 2016 2 commits
  10. 02 Sep, 2016 1 commit
  11. 01 Sep, 2016 6 commits
    • Tamar Christina's avatar
      Added support for deprecated POSIX functions on Windows. · e5ecb201
      Tamar Christina authored
      Summary:
      With the introduction of 8.0.1 We've stopped supporting in GHCi
      the use of POSIX functions under their deprecated names on Windows.
      
      This to be compatible with object and libraries from the most
      popular compilers on the platform (Microsoft and Intel compilers).
      
      However this brings a confusing disparity between the compiled and
      interpreted behavior since MingW-W64 does support the deprecated names.
      
      Also It seems clear that package writers won't update their packages to
      properly support Windows. As such I have added redirects in the RTS
      for the deprecated functions as listed on
      
      https://msdn.microsoft.com/en-us/library/ms235384.aspx.
      
      This won't export the functions (as in, they won't be in the symbol table
      of compiled code for the RTS.) but we inject them into the symbol table
      of the dynamic linker at startup.
      
      Test Plan:
      ./validate
      and
      
      make test TEST="ffi017 ffi021"
      
      Reviewers: thomie, simonmar, RyanGlScott, bgamari, austin, hvr, erikd
      
      Reviewed By: simonmar, bgamari
      
      Subscribers: RyanGlScott, #ghc_windows_task_force
      
      Differential Revision: https://phabricator.haskell.org/D2500
      
      GHC Trac Issues: #12209, #12497, #12496
      e5ecb201
    • Malo Jaffré's avatar
      Fix startsVarSym and refactor operator predicates (fixes #4239) · f233f00b
      Malo Jaffré authored
      startsVarSym used isSymbol which does not recognize valid operators
      beginning with OtherPunctuation generalCategory (e. g. (·)).
      Move it to ghc-boot-th for reducing duplication.
      
      This patch fixes template-haskell pretty printer, which is used by
      -ddump-minimal-imports.
      
      Reviewers: austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2480
      
      GHC Trac Issues: #4239
      f233f00b
    • Ben Gamari's avatar
      Revert "Fix startsVarSym and refactor operator predicates (fixes #4239)" · b946cf3f
      Ben Gamari authored
      This reverts commit 8d35e18d.
      arc butchered the authorship on this.
      b946cf3f
    • Ben Gamari's avatar
      Fix startsVarSym and refactor operator predicates (fixes #4239) · 8d35e18d
      Ben Gamari authored
      startsVarSym used isSymbol which does not recognize valid operators
      beginning with OtherPunctuation generalCategory (e. g. (·)).
      Move it to ghc-boot-th for reducing duplication.
      
      This patch fixes template-haskell pretty printer, which is used by
      -ddump-minimal-imports.
      
      Reviewers: austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2480
      
      GHC Trac Issues: #4239
      8d35e18d
    • Sergei Trofimovich's avatar
      restore -fmax-worker-args handling (Trac #11565) · a48de37d
      Sergei Trofimovich authored
      maxWorkerArgs handling was accidentally lost 3 years ago
      in a major update of demand analysis
          commit 0831a12e
      
      
      
      Old regression is noticeable as:
      - code bloat (requires stack reshuffling)
      - compilation slowdown (more code to optimise/generate)
      - and increased heap usage (DynFlags unboxing/reboxing?)
      
      On a simple compile benchmark this change causes heap
      allocation drop from 70G don to 67G (ghc perf build).
      Signed-off-by: default avatarSergei Trofimovich <siarheit@google.com>
      
      Reviewers: simonpj, ezyang, goldfire, austin, bgamari
      
      Reviewed By: simonpj, ezyang
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2503
      
      GHC Trac Issues: #11565
      a48de37d
    • Ben Gamari's avatar
      Revert "testsuite: Update bytes allocated of parsing001" · 3fb8f487
      Ben Gamari authored
      This reverts commit ca6d0eb0.
      
      I'm really not sure what happened with the test build that lead me to
      believe that this was necessary. Mysterious.
      3fb8f487
  12. 31 Aug, 2016 8 commits
  13. 30 Aug, 2016 3 commits
  14. 29 Aug, 2016 1 commit
  15. 26 Aug, 2016 2 commits