1. 08 Oct, 2016 11 commits
  2. 07 Oct, 2016 3 commits
  3. 06 Oct, 2016 5 commits
    • Edward Z. Yang's avatar
    • Joachim Breitner's avatar
      Remove dead code “mkHsConApp” · 57a207ca
      Joachim Breitner authored
      Differential Revision: https://phabricator.haskell.org/D2574
    • Joachim Breitner's avatar
      RegAlloc: Make some pattern matched complete · a2bedb5c
      Joachim Breitner authored
      these actually are complete, but due to the use of pattern guards, the
      compiler does not see that. Refactor the code that it does.
      Differential Revision: https://phabricator.haskell.org/D2574
    • Ryan Scott's avatar
      Refactor TcDeriv and TcGenDeriv · 4a03012a
      Ryan Scott authored
      Keeping a promise I made to Simon to clean up these modules.
      This change splits up the massive `TcDeriv` and `TcGenDeriv` modules into
      somewhat more manageable pieces. The new modules are:
      * `TcGenFunctor`: This contains the deriving machinery for `Functor`,
        `Foldable`, and `Traversable` (which all use the same underlying algorithm).
      * `TcDerivInfer`: This is the new home for `inferConstraints`,
        `simplifyInstanceContexts`, and related functions, whose role is to come up
        with the derived instance context and subsequently simplify it.
      * `TcDerivUtils`: This is a grab-bag module that contains several
        error-checking utilities originally in `TcDeriv`, as well as some functions
        that `TcDeriv` and `TcDerivInfer` both need.
      The end result is that `TcDeriv` is now less than 1,600 SLOC (originally 2,686
      SLOC), and `TcGenDeriv` is now about 2,000 SLOC (originally 2,964).
      In addition, this also implements a couple of tiny refactorings:
      * I transformed `type Condition = (DynFlags, TyCon) -> Validity` into
        `type Condition = DynFlags -> TyCon -> Validity`
      * I killed the `DerivSpecGeneric` constructor for `DerivSpecMechanism`, and
        merged its functionality into `DerivSpecStock`. In addition,
        `hasStockDeriving` now contains key-value pairs for `Generic` and `Generic1`,
        so they're no longer treated as an awkward special case in `TcDeriv`.
      Test Plan: ./validate
      Reviewers: simonpj, austin, bgamari
      Reviewed By: simonpj
      Subscribers: thomie, mpickering
      Differential Revision: https://phabricator.haskell.org/D2568
    • Ryan Scott's avatar
      Remove unused T12124.srderr · 58ecdf83
      Ryan Scott authored
      This was (accidentally?) introduced in 465c6c5d
  4. 05 Oct, 2016 2 commits
  5. 04 Oct, 2016 2 commits
  6. 02 Oct, 2016 16 commits
    • Ben Gamari's avatar
      runghc: Fix import of System.Process on Windows · 8952cc3e
      Ben Gamari authored
      This apparently should have been an import of rawSystem instead of
      runProcess. Oops.
      Fixes D2538.
      Test Plan: Validate on Linux and Windows.
      Reviewers: austin, snowleopard
      Reviewed By: snowleopard
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D2561
    • Edward Z. Yang's avatar
      Update Cabal submodule to latest version. · 22c6b7f2
      Edward Z. Yang authored
      Note that Cabal needs one more bugfix which is in PR to
      fix GHC bootstrapping. But the rest of the patch is
      ready for review.
      Needs a filepath submodule update because cabal check
      became more strict.
      This patch handles the abstract-ification of Version and
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      Test Plan: validate
      Reviewers: bgamari, austin
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D2555
    • Ben Gamari's avatar
      testsuite: Mark test for #12355 as unbroken on Darwin. · eda5a4ab
      Ben Gamari authored
      Somehow this testcase works on Darwin but not on Linux. This deserves
      further investigation.
    • Ben Gamari's avatar
      DynFlags: Fix absolute import path to generated header · e9104d46
      Ben Gamari authored
      Test Plan: Validate
      Reviewers: austin, snowleopard
      Reviewed By: snowleopard
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D2559
      GHC Trac Issues: #8040.
    • Ben Gamari's avatar
      Ignore output from derefnull and divbyzero on Darwin · 8cab9bd5
      Ben Gamari authored
      The output contains the pid and executable path of the bash process
      which spawned the failing process. It doesn't seem worth the effort to
      cleanse this output; just ignore it.
    • Ben Gamari's avatar
      Mark #6132 as broken on OS X · 3630ad35
      Ben Gamari authored
      It currently fails with,
          =====> T6132(normal) 1 of 1 [0, 0, 0]
          cd "./runghc/T6132.run" && "/Users/bgamari/ghc/inplace/test
          spaces/ghc-stage2" -c T6132.hs -dcore-lint -dcmm-lint
          -no-user-package-db -rtsopts -fno-warn-missed-specialisations
          -fshow-warning-groups -dno-debug-output
          Compile failed (exit code 1) errors were:
          T6132.hs:1:2: error: parse error on input ‘#!/’
          *** unexpected failure for T6132(normal)
    • Michael Snoyman's avatar
      runghc: use executeFile to run ghc process on POSIX · 42f1d867
      Michael Snoyman authored
      This means that, on POSIX systems, there will be only one ghc process
      used for running scripts, as opposed to the current situation of a
      runghc process and a ghc process. Beyond minor performance benefits of
      not having an extra fork and resident process, the more important impact
      of this is automatically getting proper signal handling. I noticed this
      problem myself when running runghc as PID1 inside a Docker container.
      I attempted to create a shim library for executeFile that would work for
      both POSIX and Windows, but unfortunately I ran into issues with exit
      codes being propagated correctly (see
      https://github.com/fpco/replace-process/issues/2). Therefore, this patch
      leaves the Windows behavior unchanged. Given that signals are a POSIX
      issue, this isn't too bad a trade-off. If someone has suggestions for
      better Windows _exec support, please let me know.
      Reviewers: erikd, austin, bgamari
      Reviewed By: bgamari
      Subscribers: Phyx, thomie
      Differential Revision: https://phabricator.haskell.org/D2538
    • Ben Gamari's avatar
      validate: Add --build-only · 4d2b15d5
      Ben Gamari authored
      This will allow us to split up Harbormaster output for the build and
      test stages of validation.
      Test Plan: `./validate --build-only && ./validate --testsuite-only`
      Reviewers: thomie, hvr, austin
      Differential Revision: https://phabricator.haskell.org/D2553
    • Ryan Scott's avatar
      Disallow standalone deriving declarations involving unboxed tuples or sums · 23cf32da
      Ryan Scott authored
      There was an awful leak where GHC permitted standalone `deriving`
      declarations to create instances for unboxed sum or tuple types. This
      fortifies the checks that GHC performs to catch this scenario and give
      an appropriate error message.
      Fixes #11509.
      Test Plan: ./validate
      Reviewers: goldfire, austin, bgamari
      Reviewed By: bgamari
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D2557
      GHC Trac Issues: #11509
    • Ryan Scott's avatar
      Eliminate some unsafeCoerce#s with deriving strategies · f547b444
      Ryan Scott authored
      Currently, `Foreign.C.Types`, `Foreign.Ptr`, and `System.Posix.Types`
      define `Read` and `Show` instances for the newtypes in those modules by
      using `unsafeCoerce#`. We can clean up this hack by using the `newtype`
      deriving strategy.
      Reviewers: hvr, austin, bgamari
      Reviewed By: bgamari
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D2556
    • Nicolas Trangez's avatar
      Turn `__GLASGOW_HASKELL_LLVM__` into an integer again · b0d53a83
      Nicolas Trangez authored
      In GHC < 8.0.1, the value of `__GLASGOW_HASKELL_LLVM__`, exposed
      through the preprocessor when compiled with `-fllvm`, was an integer
      value, encoded according to some rules specified in the user guide.
      Due to an oversight, in GHC 8.0.1 the value of this define became a
      tuple, exposed as e.g. `(3, 7)`. This was an unintended regression.
      This patch turns the value of the `__GLASGOW_HASKELL_LLVM__` definition
      into a single integer again, but changes the formatting of said number
      slightly. Before, any LLVM version where the major or minor component >=
      10 would cause ambiguous values for `__GLASGOW_HASKELL_LLVM__`. With
      this patch, the value is in line with `__GLASGOW_HASKELL__`, adding a
      padding `0` in-between major and minor component if applicable (we
      assume no minors >= 100 will ever exist).
      The documentation in the user guide is updated accordingly, and a
      reference is made in the 8.0.2 release notes.
      Test Plan: validate
      Reviewers: bgamari, erikd
      Reviewed By: bgamari
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D2552
      GHC Trac Issues: #12628
    • Niklas Hambüchen's avatar
      ghc-pkg: Allow unregistering multiple packages in one call · 0014fa56
      Niklas Hambüchen authored
      Reviewers: austin, bgamari
      Reviewed By: bgamari
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D2550
      GHC Trac Issues: #12637
    • Adam Gundry's avatar
      Do not warn about unused underscore-prefixed fields (fixes Trac #12609) · 48ff0843
      Adam Gundry authored
      When DuplicateRecordFields is enabled, the mangling of selector names
      was causing them to be reported as unused even if prefixed by an
      underscore. This corrects the OccName used by the check.
      Test Plan: New test overloadedrecflds/should_compile/T12609
      Reviewers: austin, bgamari
      Reviewed By: bgamari
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D2549
      GHC Trac Issues: #12609
    • Peter Trommler's avatar
      PPC/CodeGen: fix lwa instruction generation · ce3370e0
      Peter Trommler authored
      Opcode lwa is a 64-bit opcode and allows a DS-form only.  This patch
      generates lwa opcodes only when the offset is a multiple of 4.
      Fixes #12621
      Test Plan: validate
      Reviewers: erikd, hvr, simonmar, austin, bgamari
      Reviewed By: bgamari
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D2547
      GHC Trac Issues: #12621
    • Matthew Pickering's avatar
      Don't warn about name shadowing when renaming the patten in a PatSyn decl · 1851349a
      Matthew Pickering authored
      Previously the renamer assumed that *any* time we renamed a pattern, the
      pattern was introducing new binders. This isn't true in pattern synonym
      declarations where the pattern is used as part of a definition.
      We add a special case to not warn in this situation.
      Reviewers: simonpj, austin, bgamari
      Reviewed By: simonpj
      Subscribers: simonpj, thomie
      Differential Revision: https://phabricator.haskell.org/D2545
      GHC Trac Issues: #12615
    • Matthew Pickering's avatar
      Fix interaction of record pattern synonyms and record wildcards · 2d6642bd
      Matthew Pickering authored
      We were missing an appropiate *ConLike lookup in the case when
      the pattern synonym was defined in a different module.
      Reviewers: austin, bgamari, simonpj
      Reviewed By: simonpj
      Subscribers: simonpj, thomie
      Differential Revision: https://phabricator.haskell.org/D2544
      GHC Trac Issues: #11987
  7. 01 Oct, 2016 1 commit
    • Tamar Christina's avatar
      Add NUMA support for Windows · c93813d9
      Tamar Christina authored
      NOTE: I have been able to do simple testing on emulated NUMA nodes.
                 Real hardware would be needed for a proper test.
      D2199 Added NUMA support for Linux, I have just filled in the missing pieces following
      the description of the Linux APIs.
      Test Plan:
      Use `bcdedit.exe /set groupsize 2` to modify the kernel again (Similar to D2533).
      This generates some NUMA nodes:
      Logical Processor to NUMA Node Map:
      NUMA Node 0:
      NUMA Node 1:
      Approximate Cross-NUMA Node Access Cost (relative to fastest):
           00  01
      00: 1.1 1.1
      01: 1.0 1.0
      run ` ../test-numa.exe +RTS --numa -RTS`
      and check PerfMon for NUMA allocations.
      Reviewers: simonmar, erikd, bgamari, austin
      Reviewed By: simonmar
      Subscribers: thomie, #ghc_windows_task_force
      Differential Revision: https://phabricator.haskell.org/D2534
      GHC Trac Issues: #12602