Skip to content
Snippets Groups Projects
  1. Feb 08, 2024
  2. Apr 20, 2023
    • sheaf's avatar
      Implement -jsem: parallelism controlled by semaphores · 5c873124
      sheaf authored and Marge Bot's avatar Marge Bot committed
      See https://github.com/ghc-proposals/ghc-proposals/pull/540/ for a
      complete description for the motivation for this feature.
      
      The `-jsem` option allows a build tool to pass a semaphore to GHC which
      GHC can use in order to control how much parallelism it requests.
      
      GHC itself acts as a client in the GHC jobserver protocol.
      
      ```
      GHC Jobserver Protocol
      ~~~~~~~~~~~~~~~~~~~~~~
      
      This proposal introduces the GHC Jobserver Protocol. This protocol allows
      a server to dynamically invoke many instances of a client process,
      while restricting all of those instances to use no more than <n> capabilities.
      This is achieved by coordination over a system semaphore (either a POSIX
      semaphore [6]_  in the case of Linux and Darwin, or a Win32 semaphore [7]_
      in the case of Windows platforms).
      
      There are two kinds of participants in the GHC Jobserver protocol:
      
      - The *jobserver* creates a system semaphore with a certain number of
        available tokens.
      
        Each time the jobserver wants to spawn a new jobclient subprocess, it **must**
        first acquire a single token from the semaphore, before spawning
        the subprocess. This token **must** be released once the subprocess terminates.
      
        Once work is finished, the jobserver **must** destroy the semaphore it created.
      
      - A *jobclient* is a subprocess spawned by the jobserver or another jobclient.
      
        Each jobclient starts with one available token (its *implicit token*,
        which was acquired by the parent which spawned it), and can request more
        tokens through the Jobserver Protocol by waiting on the semaphore.
      
        Each time a jobclient wants to spawn a new jobclient subprocess, it **must**
        pass on a single token to the child jobclient. This token can either be the
        jobclient's implicit token, or another token which the jobclient acquired
        from the semaphore.
      
        Each jobclient **must** release exactly as many tokens as it has acquired from
        the semaphore (this does not include the implicit tokens).
      ```
      
      Build tools such as cabal act as jobservers in the protocol and are
      responsibile for correctly creating, cleaning up and managing the
      semaphore.
      
      Adds a new submodule (semaphore-compat) for managing and interacting
      with semaphores in a cross-platform way.
      
      Fixes #19349
      5c873124
  3. Mar 08, 2023
  4. Jun 17, 2020
    • Sylvain Henry's avatar
      ghc-bignum library · 9f96bc12
      Sylvain Henry authored
      ghc-bignum is a newer package that aims to replace the legacy
      integer-simple and integer-gmp packages.
      
      * it supports several backends. In particular GMP is still supported and
        most of the code from integer-gmp has been merged in the "gmp"
        backend.
      
      * the pure Haskell "native" backend is new and is much faster than the
        previous pure Haskell implementation provided by integer-simple
      
      * new backends are easier to write because they only have to provide a
        few well defined functions. All the other code is common to all
        backends. In particular they all share the efficient small/big number
        distinction previously used only in integer-gmp.
      
      * backends can all be tested against the "native" backend with a simple
        Cabal flag. Backends are only allowed to differ in performance, their
        results should be the same.
      
      * Add `integer-gmp` compat package: provide some pattern synonyms and
        function aliases for those in `ghc-bignum`. It is intended to avoid
        breaking packages that depend on `integer-gmp` internals.
      
      Update submodules: text, bytestring
      
      Metric Decrease:
          Conversions
          ManyAlternatives
          ManyConstructors
          Naperian
          T10359
          T10547
          T10678
          T12150
          T12227
          T12234
          T12425
          T13035
          T13719
          T14936
          T1969
          T4801
          T4830
          T5237
          T5549
          T5837
          T8766
          T9020
          parsing001
          space_leak_001
          T16190
          haddock.base
      
      On ARM and i386, T17499 regresses (+6% > 5%).
      On x86_64 unregistered, T13701 sometimes regresses (+2.2% > 2%).
      
      Metric Increase:
          T17499
          T13701
      9f96bc12
  5. Nov 28, 2019
  6. Nov 13, 2019
  7. Oct 03, 2019
  8. Jul 05, 2019
    • Artem Pelenitsyn's avatar
      Make all submodules have absolute URLs · a76b233d
      Artem Pelenitsyn authored and Marge Bot's avatar Marge Bot committed
      The relative URLs were a workaround to let most contributors fork from
      Github due to a weakness in the haskell.org server.
      
      This workaround is no longer needed. And relative submodule URLs are
      an impediment to forking which makes contributions harder than they
      should be.
      
      The URLs are chosen to clone from https, because this makes sure that
      anybody, even not a registered Gitlab user, can clone a fork
      recursively.
      a76b233d
  9. Feb 19, 2019
  10. Feb 16, 2019
    • Alec Theriault's avatar
      Remove `parallel` as a submodule · 3cb063c8
      Alec Theriault authored and Marge Bot's avatar Marge Bot committed
      `parallel` is used in exactly one place in the GHC tree: the T2317 test.
      It seems almost by accident that it is a submodule; libraries needed
      only for tests should net be included as submodules (see `QuickCheck`,
      `async`, `haskell98`, `regex-compat`, `utf8-string`, `vector` and more
      for examples).
      
      T2317 will now get run only when `parallel` is installed instead of
      `parallel` being required for the testsuite to run.
      3cb063c8
  11. Jan 31, 2019
  12. Oct 23, 2018
  13. Aug 27, 2018
  14. Jun 14, 2018
    • Ben Gamari's avatar
      Revert inadvertant changes to .gitmodules · 0c5aac8a
      Ben Gamari authored
      0c5aac8a
    • Vladislav Zavialov's avatar
      Embrace -XTypeInType, add -XStarIsType · d650729f
      Vladislav Zavialov authored
      Summary:
      Implement the "Embrace Type :: Type" GHC proposal,
      .../ghc-proposals/blob/master/proposals/0020-no-type-in-type.rst
      
      GHC 8.0 included a major change to GHC's type system: the Type :: Type
      axiom. Though casual users were protected from this by hiding its
      features behind the -XTypeInType extension, all programs written in GHC
      8+ have the axiom behind the scenes. In order to preserve backward
      compatibility, various legacy features were left unchanged. For example,
      with -XDataKinds but not -XTypeInType, GADTs could not be used in types.
      Now these restrictions are lifted and -XTypeInType becomes a redundant
      flag that will be eventually deprecated.
      
      * Incorporate the features currently in -XTypeInType into the
        -XPolyKinds and -XDataKinds extensions.
      * Introduce a new extension -XStarIsType to control how to parse * in
        code and whether to print it in error messages.
      
      Test Plan: Validate
      
      Reviewers: goldfire, hvr, bgamari, alanz, simonpj
      
      Reviewed By: goldfire, simonpj
      
      Subscribers: rwbarton, thomie, mpickering, carter
      
      GHC Trac Issues: #15195
      
      Differential Revision: https://phabricator.haskell.org/D4748
      d650729f
  15. Dec 08, 2017
  16. Sep 15, 2017
  17. Aug 01, 2017
  18. Jul 28, 2017
  19. May 11, 2017
  20. Jan 30, 2017
    • rwbarton's avatar
      Turn libraries/integer-gmp/gmp/tarball into a submodule · 32729d35
      rwbarton authored and Ben Gamari's avatar Ben Gamari committed
      The submodule repository contains the latest version of the GMP source
      distribution (6.1.2) with the doc/ subdirectory removed, as described
      in gmp/ghc.mk. Rather than applying the old patch from gmp/tarball/patch
      I moved its contents into gmp/gmpsrc.patch, canceling a patch related to
      memory management there. Experimentally, the PIC-related patch for OS X
      is still necessary.
      
      The upgrade to GMP 6.1.2 fixes #7655.
      
      Test Plan:
      Built on OS X with in-tree gmp and tested that the command
      `ghc -e 'length (show (2^(5*10^6) :: Integer))'` no longer segfaults.
      
      Reviewers: mpickering, hvr, austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: mpickering, thomie
      
      Differential Revision: https://phabricator.haskell.org/D3044
      
      GHC Trac Issues: #7655
      32729d35
  21. Feb 11, 2016
  22. Dec 11, 2015
    • Austin Seipp's avatar
      b5d5d831
    • Richard Eisenberg's avatar
      Add kind equalities to GHC. · 67465497
      Richard Eisenberg authored
      This implements the ideas originally put forward in
      "System FC with Explicit Kind Equality" (ICFP'13).
      
      There are several noteworthy changes with this patch:
       * We now have casts in types. These change the kind
         of a type. See new constructor `CastTy`.
      
       * All types and all constructors can be promoted.
         This includes GADT constructors. GADT pattern matches
         take place in type family equations. In Core,
         types can now be applied to coercions via the
         `CoercionTy` constructor.
      
       * Coercions can now be heterogeneous, relating types
         of different kinds. A coercion proving `t1 :: k1 ~ t2 :: k2`
         proves both that `t1` and `t2` are the same and also that
         `k1` and `k2` are the same.
      
       * The `Coercion` type has been significantly enhanced.
         The documentation in `docs/core-spec/core-spec.pdf` reflects
         the new reality.
      
       * The type of `*` is now `*`. No more `BOX`.
      
       * Users can write explicit kind variables in their code,
         anywhere they can write type variables. For backward compatibility,
         automatic inference of kind-variable binding is still permitted.
      
       * The new extension `TypeInType` turns on the new user-facing
         features.
      
       * Type families and synonyms are now promoted to kinds. This causes
         trouble with parsing `*`, leading to the somewhat awkward new
         `HsAppsTy` constructor for `HsType`. This is dispatched with in
         the renamer, where the kind `*` can be told apart from a
         type-level multiplication operator. Without `-XTypeInType` the
         old behavior persists. With `-XTypeInType`, you need to import
         `Data.Kind` to get `*`, also known as `Type`.
      
       * The kind-checking algorithms in TcHsType have been significantly
         rewritten to allow for enhanced kinds.
      
       * The new features are still quite experimental and may be in flux.
      
       * TODO: Several open tickets: #11195, #11196, #11197, #11198, #11203.
      
       * TODO: Update user manual.
      
      Tickets addressed: #9017, #9173, #7961, #10524, #8566, #11142.
      Updates Haddock submodule.
      67465497
  23. Dec 05, 2015
  24. Dec 04, 2015
  25. Aug 19, 2015
  26. Dec 24, 2014
  27. Nov 21, 2014
  28. Aug 14, 2014
  29. Jun 26, 2014
  30. Jun 25, 2014
    • Herbert Valerio Riedel's avatar
      Convert loose sub-repos into proper submodules (re #8545) · db19c665
      Herbert Valerio Riedel authored
      
      Specifically, the following sub-repos/modules are converted:
      
       - libffi-tarballs
       - libraries/array
       - libraries/deepseq
       - libraries/directory
       - libraries/dph
       - libraries/filepath
       - libraries/haskell2010
       - libraries/haskell98
       - libraries/hoopl
       - libraries/hpc
       - libraries/old-locale
       - libraries/old-time
       - libraries/parallel
       - libraries/process
       - libraries/stm
       - libraries/unix
       - nofib
       - utils/hsc2hs
      
      N.B. ghc-tarballs is not converted as it will probably be handled
           differently in the future.
      
      Signed-off-by: Herbert Valerio Riedel's avatarHerbert Valerio Riedel <hvr@gnu.org>
      db19c665
  31. Mar 23, 2014
  32. Feb 06, 2014
  33. Nov 22, 2013
    • Joachim Breitner's avatar
      Ignore untracked contents in submodules · 3fdad857
      Joachim Breitner authored
      The GHC build creates files there that are not part of the project’s
      .gitignore, and clutter up "git status" in ghc/. With this patch, these
      changes are ignored; modifications to existing files in the submodule
      repositories are still reported.
      3fdad857
  34. Aug 19, 2013
  35. Aug 09, 2013
  36. Feb 03, 2013
  37. Dec 02, 2012
Loading