Skip to content
Snippets Groups Projects
  1. Sep 12, 2016
    • 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
  2. Sep 10, 2016
    • Tamar Christina's avatar
      Add platform warning to Foreign.C.Types · 710f21cc
      Tamar Christina authored
      Summary:
      The generated documentation for thhe Foreign.C.Types
      module is generated based on the platform which ran Haddock.
      
      This is generating incorrect types for e.g. Windows.
      
      Add a disclaimer to the top of the page to ask people to
      keep this in mind.
      
      Test Plan: make documentation and inspect Haddock
      
      Reviewers: erikd, austin, hvr, bgamari
      
      Reviewed By: erikd
      
      Subscribers: RyanGlScott, #ghc_windows_task_force, thomie
      
      Differential Revision: https://phabricator.haskell.org/D2523
      
      GHC Trac Issues: #12586
      710f21cc
  3. Sep 01, 2016
    • 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
  4. Aug 31, 2016
    • Ryan Scott's avatar
      Add Read1/Read2 methods defined in terms of ReadPrec · 9cfef167
      Ryan Scott authored
      This adds new methods `liftReadList(2)` and `liftReadListPrec(2)` to the
      `Read1`/`Read2` classes which are defined in terms of `ReadPrec` instead
      of `ReadS`. This also adds related combinators and changes existing
      `Read1` and `Read2` instances to be defined in terms of the new methods.
      
      Reviewers: hvr, austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2379
      
      GHC Trac Issues: #12358
      9cfef167
  5. Aug 18, 2016
  6. Aug 16, 2016
  7. Aug 08, 2016
  8. Aug 06, 2016
  9. Aug 04, 2016
  10. Jul 27, 2016
  11. Jul 20, 2016
  12. Jul 18, 2016
  13. Jul 16, 2016
  14. Jul 14, 2016
  15. Jul 08, 2016
  16. Jul 07, 2016
  17. Jul 04, 2016
  18. Jul 01, 2016
  19. Jun 29, 2016
    • Thomas Miedema's avatar
      Testsuite: use ignore_stderr/stdout instead of ignore_output · 1084d375
      Thomas Miedema authored
      The problem with ignore_output is that it hides errors for WAY=ghci.
      GHCi always returns with exit code 0 (unless it is broken itself).
      
      For example: ghci015 must have been failing with compile errors for
      years, but we didn't notice because all output was ignored.
      
      Therefore, replace all uses of ignore_output with either ignore_stderr
      or ignore_stdout. In some cases I opted for adding the expected output.
      
      Update submodule hpc and stm.
      
      Reviewed by: simonmar
      
      Differential Revision: https://phabricator.haskell.org/D2367
      1084d375
    • niteria's avatar
      Double the file descriptor limit for openFile008 · 8f7194fa
      niteria authored
      I have get test failures on `openFile008` with
      `openFile: resource exhausted (Too many open files)` when running
      inside `./validate`, but not when I run the test individually.
      I suspect that's because with `./validate` parallelism of 33 threads
      I go just above the `1024` file descriptor limit.
      This is probably related to the recent change:
      `58f0086b: Testsuite: open/close stdin/stdout/stderr explicitly`
      but I haven't looked deep enough to understand exactly how.
      I think bumping this is harmless, but I don't really know why it's
      necessary at all.
      
      Test Plan: ./validate
      
      Reviewers: austin, thomie, hvr, bgamari, simonmar
      
      Reviewed By: simonmar
      
      Subscribers: simonmar
      
      Differential Revision: https://phabricator.haskell.org/D2368
      8f7194fa
  20. Jun 28, 2016
    • Thomas Miedema's avatar
      Testsuite: mark tests expect_broken · 3fb9837f
      Thomas Miedema authored
      * T7837 is still broken for prof_ways (#9406)
      * T11627b is broken on Windows for WAY=prof_hc_hb (#12236)
      * T8089 is also broken for WAY=profasm on Windows
      3fb9837f
    • Thomas Miedema's avatar
      Testsuite: open/close stdin/stdout/stderr explicitly · 58f0086b
      Thomas Miedema authored
      This allows run_command's to contain `|`, and `no_stdin` isn't necessary
      anymore.
      
      Unfortunately it doesn't fix T7037 on Windows which I had hoped it would
      (testsuite driver tries to read a file that it just created itself, but
      the OS says it doesn't exist).
      
      The only drawback of this commit is that the command that the testsuite
      prints to the terminal (for debugging purposes) doesn't mention the
      files that stdout and stderr are redirected to anymore. This is probably
      ok.
      
      Update submodule unix.
      
      Differential Revision: https://phabricator.haskell.org/D1234
      58f0086b
  21. Jun 24, 2016
  22. Jun 20, 2016
  23. Jun 18, 2016
    • Ryan Scott's avatar
      Add Bifoldable and Bitraversable to base · 270d545d
      Ryan Scott authored
      This adds `Data.Bifoldable` and `Data.Bitraversable` from the
      `bifunctors` package to `base`, completing the migration started in
      D336.  This is fairly straightforward, although there were a suprising
      amount of reinternal organization in `base` that was needed for this to
      happen:
      
      * `Data.Foldable`, `Data.Traversable`, `Data.Bifoldable`, and
        `Data.Bitraversable` share some nonexported datatypes (e.g., `StateL`,
        `StateR`, `Min`, `Max`, etc.) to implement some instances. To avoid
        code duplication, I migrated this internal code to a new hidden
        module, `Data.Functor.Utils` (better naming suggestions welcome).
      
      * `Data.Traversable` and `Data.Bitraversable` also make use of an
        identity newtype, so I modified them to use
        `Data.Functor.Identity.Identity`. This has a ripple effect on several
        other modules, since I had to move instances around in order to avoid
        dependency cycles.
      
      Fixes #10448.
      
      Reviewers: ekmett, hvr, austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2284
      
      GHC Trac Issues: #9682, #10448
      270d545d
    • Thomas Miedema's avatar
      Testsuite: write "\n" instead of "\r\n" when using mingw Python · 6f6f5154
      Thomas Miedema authored
      Mingw style Python uses '\r\n' by default for newlines. This is
      annoying, because it means that when a GHC developer on Windows uses
      mingw Python to `make accept` a test, every single line of the
      .stderr file is touched. This makes it difficult to spot the real
      changes, and it leads to unnecessary git history bloat.
      
      Prevent this from happening by using io.open instead of open.
      See `Note [Universal newlines]`
      
      Reviewed by: Phyx
      
      Differential Revision: https://phabricator.haskell.org/D2342
      6f6f5154
  24. Jun 17, 2016
    • Simon Marlow's avatar
      NUMA cleanups · 498ed266
      Simon Marlow authored
      - Move the numaMap and nNumaNodes out of RtsFlags to Capability.c
      - Add a test to tests/rts
      498ed266
  25. Jun 10, 2016
    • Simon Marlow's avatar
      Rts flags cleanup · c88f31a0
      Simon Marlow authored
      * Remove unused/old flags from the structs
      * Update old comments
      * Add missing flags to GHC.RTS
      * Simplify GHC.RTS, remove C code and use hsc2hs instead
      * Make ParFlags unconditional, and add support to GHC.RTS
      c88f31a0
  26. Jun 06, 2016
  27. Jun 04, 2016
    • Ryan Scott's avatar
      Replace hand-written Bounded instances with derived ones · 59651173
      Ryan Scott authored
      Summary:
      The spiritual successor to D2291, since deriving `Bounded` instances
      in `GHC.Enum` wasn't possible prior to changes made in that Diff.
      
      This Diff finds every manually implemented `Bounded` instance in `base` that is
      completely equivalent to the derived instances, and replaces it.
      
      Reviewers: bgamari, goldfire, austin, hvr
      
      Reviewed By: austin, hvr
      
      Subscribers: thomie, rwbarton
      
      Differential Revision: https://phabricator.haskell.org/D2301
      59651173
  28. Jun 03, 2016
    • Ryan Scott's avatar
      Derive instances in Data.Data · 4842a805
      Ryan Scott authored
      Summary:
      Currently, none of the `Data` instances in `Data.Data` are derived,
      which has resulted in hundreds of lines of laboriously hand-written `Data`
      instances. This cleans it up by using `DeriveDataTypeable` to derive all of
      the boring instances.
      
      Note that previously, `tcTopSrcDecls` in `TcRnDriver` was typechecking the
      variables generated in `deriving` statements before other top-level variables,
      which causes an error when `DeriveDataTypeable` is used in `Data.Data`, since
      the `deriving`-generated variable definitions refer to top-level definitions
      in `Data.Data` itself. To fix this, the order in which these two groups are
      typechecked was reversed.
      
      Test Plan: ./validate
      
      Reviewers: rwbarton, bgamari, hvr, austin
      
      Reviewed By: austin
      
      Subscribers: rwbarton, thomie
      
      Differential Revision: https://phabricator.haskell.org/D2291
      4842a805
  29. May 25, 2016
  30. May 24, 2016
  31. May 22, 2016
    • Thomas Miedema's avatar
      Testsuite: fix T12010 for real · 2230c882
      Thomas Miedema authored
      * Use `extra_files` instead of (the deprecated) `extra_clean` (#11980).
      
      * Don't depend on generated files from build tree
        (libraries/base/include/HsBaseConfig.h). Running
        'make test TEST=T12010' should work, even without building GHC first
        (it will use the system installed ghc).
      
      Test Plan: 'make test TEST=T12010' on Linux and Windows.
      
      Reviewed by: Phyx
      
      Differential Revision: https://phabricator.haskell.org/D2256
      
      GHC Trac Issues: #12010
      2230c882
Loading