This project is mirrored from Pull mirroring failed .
Repository mirroring has been paused due to too many failed attempts. It can be resumed by a project maintainer.
Last successful update .
  1. 02 Feb, 2017 3 commits
  2. 01 Feb, 2017 6 commits
  3. 31 Jan, 2017 9 commits
    • Ben Gamari's avatar
      Export callStackDoc · 25e0cfc6
      Ben Gamari authored
      It's generally a pretty useful thing to have around.
      [skip ci]
      Test Plan: Build it
      Reviewers: austin, dfeuer
      Reviewed By: dfeuer
      Subscribers: dfeuer, thomie
      Differential Revision:
    • Takenobu Tani's avatar
      user-guide: fix links and file names (fixes #13198) · b15136af
      Takenobu Tani authored
      There are some incorrect links and file names in GHC user's guide.
        * docs/users_guide/glasgow_exts.rst
          - GHC/Base.lhs
          - GHC/List.lhs
        * docs/users_guide/ffi-chap.rst
          - :base-ref:`Foreign`
          - :base-ref:`Control.Concurrent`
      I fixed them.
      Reviewers: austin, bgamari
      Reviewed By: bgamari
      Subscribers: thomie
      Differential Revision:
      GHC Trac Issues: #13198
    • alexbiehl's avatar
      Abstract over the way eventlogs are flushed · 4dfc6d1c
      alexbiehl authored
      Currently eventlog data is always written to a file `progname.eventlog`.
      This patch introduces the `flushEventLog` field in `RtsConfig` which
      allows to customize the writing of eventlog data.
      One possible scenario is the ongoing live-profile-monitor effort by
      @NCrashed which slurps all eventlog data through `fluchEventLog`.
      `flushEventLog` takes a buffer with eventlog data and its size and
      returns `false` (0) in case eventlog data could not be procesed.
      Reviewers: simonmar, austin, erikd, bgamari
      Reviewed By: simonmar, bgamari
      Subscribers: qnikst, thomie, NCrashed
      Differential Revision:
    • Ben Gamari's avatar
      FloatOut: Allow floating through breakpoint ticks · 44f079f7
      Ben Gamari authored
      I believe this is actually a completely valid thing to do, despite the
      arguments put forth in #10052. All that was missing was logic in
      SetLevels to correctly substitute the cloned binders into the
      breakpoint's free variable list.
      This is a prerequisite for enabling StaticPointer support in the
      Test Plan: Validate
      Reviewers: austin, scpmw
      Subscribers: thomie
      Differential Revision:
    • Ben Gamari's avatar
    • Ben Gamari's avatar
    • David Feuer's avatar
      Mark reallyUnsafePtrEquality# as can_fail · b3576ed2
      David Feuer authored
      As described in the note, floating `reallyUnsafePtrEquality#`
      out can make it much less precise. Marking it `can_fail` will
      prevent it from floating out, which I believe is particularly
      important in light of 5a9a1738,
      and should also help prevent let/app invariant failures as seen
      in #11444 and #13027.
      Reviewers: simonpj, austin, bgamari
      Subscribers: thomie
      Differential Revision:
      GHC Trac Issues: #13027, #11444
    • Daniel Haraj's avatar
      Use top-level instances to solve superclasses where possible · 748b7974
      Daniel Haraj authored
      This patch introduces a new flag `-fsolve-constant-dicts` which makes the
      constraint solver solve super class constraints with available dictionaries if
      possible. The flag is enabled by `-O1`.
      The motivation of this patch is that the compiler can produce more efficient
      code if the constraint solver used top-level instance declarations to solve
      constraints that are currently solved givens and their superclasses. In
      particular, as it currently stands, the compiler imposes a performance penalty
      on the common use-case where superclasses are bundled together for user
      convenience. The performance penalty applies to constraint synonyms as
      well. This example illustrates the issue:
      {-# LANGUAGE ConstraintKinds, MultiParamTypeClasses, FlexibleContexts #-}
      module B where
      class M a b where m :: a -> b
      type C a b = (Num a, M a b)
      f :: C Int b => b -> Int -> Int
      f _ x = x + 1
      Output without the patch, notice that we get the instance for `Num Int` by
      using the class selector `p1`.
      f :: forall b_arz. C Int b_arz => b_arz -> Int -> Int
      f =
        \ (@ b_a1EB) ($d(%,%)_a1EC :: C Int b_a1EB) _ (eta1_B1 :: Int) ->
          + @ Int
            (GHC.Classes.$p1(%,%) @ (Num Int) @ (M Int b_a1EB) $d(%,%)_a1EC)
      Output with the patch, nicely optimised code!
      f :: forall b. C Int b => b -> Int -> Int
      f =
        \ (@ b) _ _ (x_azg :: Int) ->
          case x_azg of { GHC.Types.I# x1_a1DP ->
          GHC.Types.I# (GHC.Prim.+# x1_a1DP 1#)
      Reviewers: simonpj, bgamari, austin
      Reviewed By: simonpj
      Subscribers: mpickering, rwbarton, thomie
      Differential Revision:
      GHC Trac Issues: #12791, #5835
    • alexbiehl's avatar
      Fix binary instance for SrcStrictness · c71f0c4e
      alexbiehl authored
      Summary: Found while revisiting the binary serialization for interface files.
      Test Plan: Building and validating currently
      Reviewers: austin, bgamari, mpickering
      Reviewed By: mpickering
      Subscribers: mpickering, thomie
      Differential Revision:
  4. 30 Jan, 2017 12 commits
    • rwbarton's avatar
      Turn libraries/integer-gmp/gmp/tarball into a submodule · 32729d35
      rwbarton authored
      The submodule repository contains the latest version of the GMP source
      distribution (6.1.2) with the doc/ subdirectory removed, as described
      in gmp/ 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:
      GHC Trac Issues: #7655
    • Takenobu Tani's avatar
      Fix minor typo in · e9a239ce
      Takenobu Tani authored
      Reviewers: austin, bgamari
      Reviewed By: bgamari
      Subscribers: thomie
      Differential Revision:
    • Takenobu Tani's avatar
      Fix links to building guides in · 9af1fb28
      Takenobu Tani authored has an old link to 'Building/Hacking'.  I updated it to
      suitable links for new contributors.
      Reviewers: austin, bgamari
      Reviewed By: bgamari
      Subscribers: thomie
      Differential Revision:
    • rwbarton's avatar
      Simplify minusInteger in integer-gmp slightly · f984bf2e
      rwbarton authored
      These two special cases were created in D2278 by mechanically
      inlining negateInteger into plusInteger. They aren't needed
      (the `minusInteger (S# x#) (S# y#)` case already handles all values
      correctly), and they can never help by avoiding an allocation,
      unlike the original special case in plusInteger, since we still
      have to allocate the result.
      Removing these special cases will save a couple comparisons and
      conditional branches in the common case of subtracting two small
      Test Plan:
      Existing test `plusMinusInteger` already tests
      the values in question.
      Reviewers: bgamari, goldfire, austin, hvr
      Reviewed By: bgamari, hvr
      Subscribers: thomie
      Differential Revision:
    • Matthew Pickering's avatar
      Print COMPLETE pragmas in --show-iface · 5f8e2344
      Matthew Pickering authored
      Reviewers: austin, bgamari
      Reviewed By: bgamari
      Subscribers: thomie
      Differential Revision:
    • Tamar Christina's avatar
      Slighly clean up symbol loading error. · f41c27d3
      Tamar Christina authored
      The symbol not found error that is triggered
      during lazy-loading was a bit chaotic before.
      This reformats it a bit to:
      ghc-stage2.exe:  | E:\...\libLLVMSupport.a: unknown symbol `_ZN4llvm5APIntC1Ejyb'
      ghc-stage2.exe:  | E:\...\libLLVMCore.a: unknown symbol `_ZN4llvm5APInt14AssignSlowCaseERKS0_'
      ghc-stage2.exe:  | E:\...\libLLVMCore.a: unknown symbol `_ZN4llvm13ConstantRangeC1ENS_5APIntES1_'
      ghc-stage2.exe:  | E:\...\libLLVMCore.a: unknown symbol `_ZN4llvm14FoldingSetImplC2Ej'
      ghc-stage2.exe:  | E:\...\libLLVMCore.a: unknown symbol `_ZN4llvm15LLVMContextImplD1Ev'
      ghc-stage2.exe:  | E:\...\libLLVMLTO.a: unknown symbol `_ZN4llvm11LLVMContextD1Ev'
      ghc-stage2.exe:  | E:\...\libLLVMCore.a: unknown symbol `_ZNK4llvm5Value10getContextEv'
      ghc-stage2.exe: ^^ Could not load 'LLVMIsMultithreaded', dependency unresolved.
      See top entry above.
      I have also thought about also showing the demangled names, as it may
      be useful for the end user.
      `libgcc` seems to provide a method for this so we wouldn't need any
      extra dependency.
      Any thoughts on this or would it not be useful?
      Reviewers: austin, erikd, simonmar, bgamari
      Reviewed By: bgamari
      Subscribers: RyanGlScott, thomie, #ghc_windows_task_force
      Differential Revision:
      GHC Trac Issues: #13093, #13113
    • Iavor S. Diatchki's avatar
      Fixes bug #11046 · 55935738
      Iavor S. Diatchki authored
      For some time now, type-level operators such as '+' have been treated as
      type constructors, rahter than type variables.  This pathc fixes TH's
      `lookupName` function to account for this behavior.
      Reviewers: bgamari, austin, goldfire, RyanGlScott
      Reviewed By: RyanGlScott
      Subscribers: Phyx, thomie
      Differential Revision:
      GHC Trac Issues: #11046
    • Matthew Pickering's avatar
      Add a flag to emit error messages as JSON · 91691117
      Matthew Pickering authored
      This patch adds the flag `-ddump-json` which dumps all the compiler
      output as a JSON array. This allows tooling to more easily parse GHC's
      output to display to users.
      The flag is currently experimental and will hopefully be refined for the
      next release.  In particular I have avoided any changes which involve
      significant refactoring and provided what is easy given the current
      Reviewers: austin, bgamari
      Reviewed By: bgamari
      Subscribers: DanielG, gracjan, thomie
      Differential Revision:
      GHC Trac Issues: #13190
    • Ryan Scott's avatar
      Check that a default type signature aligns with the non-default signature · 7363d538
      Ryan Scott authored
      Before, GHC was extremely permissive about the form a default type
      signature could take on in a class declaration. Notably, it would accept
      garbage like this:
        class Monad m => MonadSupply m where
          fresh :: m Integer
          default fresh :: MonadTrans t => t m Integer
          fresh = lift fresh
      And then give an extremely confusing error message when you actually
      tried to declare an empty instance of MonadSupply. We now do extra
      validity checking of default type signatures to ensure that they align
      with their non-default type signature counterparts. That is, a default
      type signature is allowed to differ from the non-default one only in its
      context - they must otherwise be alpha-equivalent.
      Fixes #12918.
      Test Plan: ./validate
      Reviewers: goldfire, simonpj, austin, bgamari
      Reviewed By: bgamari
      Subscribers: mpickering, dfeuer, thomie
      Differential Revision:
      GHC Trac Issues: #12918
    • Rufflewind's avatar
      Fix broken tests · 2ec1c834
      Rufflewind authored
      1. DoParamM requires the FlexibleContexts pragma now.
      2. topHandler02 and topHandler03 were broken as failed to
         translate signals to exit codes.
      3. topHandler03 does not produce a consistent stderr, as it depends on
         what the user has /bin/sh set to.  dash writes "Terminated" whereas
         bash and zsh produce nothing in non-interactive mode.
      4. The remaining tests are broken due to changes in the error message
      Test Plan: validate
      Reviewers: thomie, dfeuer, austin, hvr, bgamari
      Reviewed By: bgamari
      Subscribers: Phyx, dfeuer
      Differential Revision:
    • Erik de Castro Lopo's avatar
      Fix deprecation warnings from containers · d2cf5dea
      Erik de Castro Lopo authored
      The functions that were causing warnings were deprecated in containers
      0.5 and GHC is already using containers
      Test Plan: validate
      Reviewers: rwbarton, bgamari, hsyl20, austin, dfeuer
      Reviewed By: dfeuer
      Subscribers: thomie
      Differential Revision:
    • Ryan Scott's avatar
      Fix mismatched tick in GHC.Generics documentation · f60287c4
      Ryan Scott authored
      [ci skip]
      A Generic derivation example in the documentation of GHC.Generics put a tick
      (used for datatype promotion) in the wrong place.
      Fixes #13206.
  5. 29 Jan, 2017 2 commits
    • Sergei Trofimovich's avatar
      UNREG: add a forward declaration for local literals · 4441f907
      Sergei Trofimovich authored
      When toplevel literals don't have a way to be exported
      from module GHC infers their labels as static.
      Example from GHC.Arr:
          static char rdVA_bytes[] = " out of range ";
      When this label is used in module internally
      we also need to provide it's forward declaration.
      Signed-off-by: default avatarSergei Trofimovich <>
    • Sergei Trofimovich's avatar
      UNREG: fix "_bytes" string literal forward declaration · 34a02055
      Sergei Trofimovich authored
      Typical UNREG build failure looks like that:
        ghc-unreg/includes/Stg.h:226:46: error:
           note: in definition of macro 'EI_'
           #define EI_(X)          extern StgWordArray (X) GNU_ATTRIBUTE(aligned (8))
        226 | #define EI_(X)          extern StgWordArray (X) GNU_ATTRIBUTE(aligned (8))
            |                                              ^
        /tmp/ghc10489_0/ghc_3.hc:1754:6: error:
           note: previous definition of 'ghczmprim_GHCziTypes_zdtcTyCon2_bytes' was here
           char ghczmprim_GHCziTypes_zdtcTyCon2_bytes[] = "TyCon";
        1754 | char ghczmprim_GHCziTypes_zdtcTyCon2_bytes[] = "TyCon";
             |      ^
      As we see here "_bytes" string literals are defined as 'char []'
      array, not 'StgWord []'.
      The change special-cases "_bytes" string literals to have
      correct declaration type.
      Signed-off-by: default avatarSergei Trofimovich <>
  6. 28 Jan, 2017 3 commits
    • Ryan Scott's avatar
      Convert pprTrace in isPredTy to a WARN · bc42e2b0
      Ryan Scott authored
      There was a `pprTrace` in `isPredTy` that could fire under certain
      scenarios, causing normal GHC users to see debugging output. This turns it into
      a less chatty `WARN`, and expounds on the comment below it to add the scenario
      in #13187 which triggered the `pprTrace`.
      Reviewers: goldfire, austin, bgamari
      Reviewed By: goldfire, bgamari
      Subscribers: thomie
      Differential Revision:
      GHC Trac Issues: #13187
    • Ömer Sinan Ağacan's avatar
    • Tamar Christina's avatar
      Add delete retry loop. [ci skip] · 1f366b8d
      Tamar Christina authored
      On Windows we have to retry the delete a couple of times.
      The reason for this is that a `FileDelete` command just marks a
      file for deletion. The file is really only removed when the last
      handle to the file is closed. Unfortunately there are a lot of
      system services that can have a file temporarily opened using a shared
      readonly lock, such as the built in AV and search indexer.
      We can't really guarantee that these are all off, so what we can do is
      whenever after a `rmtree` the folder still exists to try again and wait a bit.
      Based on what I've seen from the tests on CI server, is that this is relatively rare.
      So overall we won't be retrying a lot. If after a reasonable amount of time the folder is
      still locked then abort the current test by throwing an exception, this so it won't fail
      with an even more cryptic error.
      The issue is that these services often open a file using `FILE_SHARE_DELETE` permissions.
      So they can seemingly be removed, and for most intended purposes they are, but recreating
      the file with the same name will fail as the FS will prevent data loss.
      The MSDN docs for `DeleteFile` says:
      The DeleteFile function marks a file for deletion on close.
      Therefore, the file deletion does not occur until the last handle
      to the file is closed. Subsequent calls to CreateFile to open the
      file fail with ERROR_ACCESS_DENIED.
      Retrying seems to be a common pattern, SQLite has it in their driver
      The only way to avoid this is to run each way of a test in it's own folder.
      This would also have the added bonus of increased parallelism.
      Reviewers: austin, bgamari
      Reviewed By: bgamari
      Subscribers: thomie, #ghc_windows_task_force
      Differential Revision:
      GHC Trac Issues: #12661, #13162
  7. 26 Jan, 2017 5 commits
    • Chris Martin's avatar
      Remove Data.Tuple doc's claim to have tuple types · 2af38b06
      Chris Martin authored
      "The tuple data types" seems like an inaccurate way to lead off the
      description of this module, which doesn't actually export the tuple data
      types. The latter part of the sentence, "associated functions",
      accurately describes the entire module.
      Reviewers: austin, hvr, bgamari
      Reviewed By: bgamari
      Subscribers: dfeuer, thomie
      Differential Revision:
    • Daishi Nakajima's avatar
      Fix the right-shift operation for negative big integers (fixes #12136) · 06b9561a
      Daishi Nakajima authored
      In `x shiftR y`, any of the following conditions cause an abort:
      - `x` is a negative big integer
      - The size of `x` and `y` is a multiple of `GMP_NUMB_BITS`
      - The bit of the absolute value of `x` is filled with `1`
      For example:
      Assuming `GMP_NUMB_BITS = 2`,  the processing of `-15 shiftR 2` is as 
      1. -15 = -1111 (twos complement: 10001)
      2. right shift 2 (as a positive number) -> 0011
      3. Due to the shift larger than GMP_NUMB_BITS, the size of the 
      destination is decreasing (2bit) -> 11
      4. Add 1, and get carry: (1) 00
      5. abort
      I fixed it that the destination size does not decrease in such a case.
      Test Plan: I tested the specific case being reported.
      Reviewers: goldfire, austin, hvr, bgamari, rwbarton
      Reviewed By: bgamari, rwbarton
      Subscribers: mpickering, rwbarton, thomie
      Differential Revision:
      GHC Trac Issues: #12136
    • Simon Marlow's avatar
      Fatal if we try to reinitialize the RTS · 2ffcdfad
      Simon Marlow authored
      This isn't supported, and fatalling with an error is better than
      segfaulting later.
      Test Plan: validate
      Reviewers: JonCoens, austin, erikd, niteria, bgamari
      Reviewed By: niteria, bgamari
      Subscribers: thomie
      Differential Revision:
    • Ben Gamari's avatar
      Bump hsc2hs submodule · 4e63e859
      Ben Gamari authored
    • Ben Gamari's avatar
      Bump nofib submodule · d8cb4b0d
      Ben Gamari authored