1. 17 Nov, 2016 1 commit
    • Edward Z. Yang's avatar
      Test for type synonym loops on TyCon. · 31398fbc
      Edward Z. Yang authored
      Previously, we tested for type synonym loops by doing
      a syntactic test on the literal type synonym declarations.
      However, in some cases, loops could go through hs-boot
      files, leading to an infinite loop (#12042); a similar
      situation can occur when signature merging.
      This commit replaces the syntactic test with a test on
      TyCon, simply by walking down all type synonyms until
      we bottom out, or find we've looped back.  It's a lot
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      Test Plan: validate
      Reviewers: simonpj, austin, bgamari
      Subscribers: goldfire, thomie
      Differential Revision: https://phabricator.haskell.org/D2656
      GHC Trac Issues: #12042
  2. 10 Nov, 2016 1 commit
    • Ryan Scott's avatar
      Prevent GND from inferring an instance context for method-less classes · 03e8d26f
      Ryan Scott authored
      When `GeneralizedNewtypeDeriving` is used with a type class that has no
      methods, it will generate a redundant context, and as a result, it can
      trigger warnings when compiled with `-Wredundant-constraints`. This is a
      simple change in behavior to check beforehand if a class has methods
      when deriving it with GND, and if it has no methods, avoid inferring the
      redundant context.
      Beware that the test for #6088, which used to be expected to fail, now
      compiles without issue since it doesn't infer a problematic instance
      Thanks to Simon Peyton Jones for doing the necessary refactoring in
      Fixes #12814.
      Test Plan: ./validate
      Reviewers: goldfire, rwbarton, simonpj, austin, bgamari
      Reviewed By: simonpj
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D2692
      GHC Trac Issues: #12814
  3. 06 Nov, 2016 1 commit
  4. 05 Nov, 2016 1 commit
  5. 22 Oct, 2016 1 commit
    • Erik de Castro Lopo's avatar
      Add -Wcpp-undef warning flag · 3cb32d8b
      Erik de Castro Lopo authored
      When enabled, this new warning flag passes `-Wundef` to the C
      pre-processor which causes the pre-processor to warn on uses of
      the `#if` directive on undefined identifiers.
      It is not currently enabled in any of the standard warning groups.
      Test Plan: Make sure the two tests pass on all major platforms.
      Reviewers: hvr, carter, Phyx, bgamari, austin
      Reviewed By: Phyx
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D2626
      GHC Trac Issues: #12752
  6. 14 Oct, 2016 1 commit
    • Ryan Scott's avatar
      Make error when deriving an instance for a typeclass less misleading · d5a4e49d
      Ryan Scott authored
      Before, when you attempted to derive an instance for a typeclass,
      class C1 (a :: Constraint) where
      class C2 where
      deriving instance C1 C2
      GHC would complain that `C2`'s data constructors aren't in scope. But
      makes no sense, since typeclasses don't have constructors! By refining
      checks that GHC performs when deriving, we can make the error message a
      little more sensible.
      This also cleans up a related `DeriveAnyClass` infelicity. Before, you
      wouldn't have been able to compile code like this:
      import System.IO (Handle)
      class C a
      deriving instance C Handle
      Since GHC was requiring that all data constructors of `Handle` be in
      scope. But `DeriveAnyClass` doesn't even generate code that mentions
      any data constructors, so this requirement is silly!
      Fixes #11509.
      Test Plan: make test TEST=T11509
      Reviewers: simonpj, austin, bgamari
      Reviewed By: simonpj, bgamari
      Subscribers: thomie, simonpj
      Differential Revision: https://phabricator.haskell.org/D2558
      GHC Trac Issues: #11509
  7. 01 Oct, 2016 3 commits
    • 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
    • Tamar Christina's avatar
      Support more than 64 logical processors on Windows · 3c179054
      Tamar Christina authored
      Windows support for more than 64 logical processors are implemented
      using processor groups.
      Essentially what it's doing is keeping the existing maximum of 64
      processors and keeping the affinity mask a 64 bit value, but adds an
      hierarchy above that.
      This support was added to Windows 7 and so we need to at runtime detect
      if the APIs are still there due to our minimum supported version being
      Windows Vista.
      The Maximum number of groups supported at this time is 4, so 256 logical
      cores.  The group indices are 0 based. One thread can have affinity with
      multiple groups.
      and particularly helpful is the whitepaper: 'Supporting Systems that
      have more than 64 processors' at
      Processor groups are not guaranteed to be uniformly distributed nor
      guaranteed to be filled before a next group is needed. The OS will
      assign processors to groups based on physical proximity and will never
      partially assign cores from one physical cpu to more than one group. If
      one has two 48 core CPUs then you'd end up with two groups of 48 logical
      cpus. Now add a 3rd CPU with 10 cores and the group it is assigned to
      depends where the socket is on the board.
      Test Plan:
      ./validate or make test -c . in the rts test folder.
      This tests for regressions, to test this particular functionality
         <program> +RTS -N -qa -RTS
      Test is detailed in description.
      Reviewers: bgamari, simonmar, austin, erikd
      Reviewed By: simonmar
      Subscribers: thomie, #ghc_windows_task_force
      Differential Revision: https://phabricator.haskell.org/D2533
      GHC Trac Issues: #11054
    • Ryan Scott's avatar
      Implement deriving strategies · 9e862765
      Ryan Scott authored
      Allows users to explicitly request which approach to `deriving` to use
      via keywords, e.g.,
      newtype Foo = Foo Bar
        deriving Eq
        deriving stock    Ord
        deriving newtype Show
      Fixes #10598. Updates haddock submodule.
      Test Plan: ./validate
      Reviewers: hvr, kosmikus, goldfire, alanz, bgamari, simonpj, austin,
      erikd, simonmar
      Reviewed By: alanz, bgamari, simonpj
      Subscribers: thomie, mpickering, oerjan
      Differential Revision: https://phabricator.haskell.org/D2280
      GHC Trac Issues: #10598
  8. 01 Sep, 2016 3 commits
  9. 31 Aug, 2016 4 commits
  10. 29 Aug, 2016 1 commit
  11. 23 Aug, 2016 1 commit
    • Ryan Scott's avatar
      Template Haskell support for unboxed sums · 613d7455
      Ryan Scott authored
      This adds new constructors `UnboxedSumE`, `UnboxedSumT`, and
      `UnboxedSumP` to represent unboxed sums in Template Haskell.
      One thing you can't currently do is, e.g., `reify ''(#||#)`, since I
      don't believe unboxed sum type/data constructors can be written in
      prefix form.  I will look at fixing that as part of #12514.
      Fixes #12478.
      Test Plan: make test TEST=T12478_{1,2,3}
      Reviewers: osa1, goldfire, austin, bgamari
      Reviewed By: goldfire, bgamari
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D2448
      GHC Trac Issues: #12478
  12. 22 Aug, 2016 1 commit
    • Ryan Scott's avatar
      Move #12403, #12513 users guide notes to 8.2.1 release notes · acdbd16f
      Ryan Scott authored
      The changes in #12403 and #12513 subtly changed the behavior of Template
      Haskell reification and splicing. While the old behavior was certainly buggy,
      it's possible that there's code in the wild that depended on the old behavior
      to work. To err on the side of caution, I'll postpone these changes to GHC
      8.2.1 instead of having them merged into GHC 8.0.2.
  13. 21 Aug, 2016 1 commit
  14. 18 Aug, 2016 1 commit
  15. 20 Jul, 2016 2 commits
    • Dylan Meysmans's avatar
      Data.Either: Add fromLeft and fromRight (#12402) · a0f83a62
      Dylan Meysmans authored
      Reviewers: austin, hvr, RyanGlScott, bgamari
      Reviewed By: RyanGlScott, bgamari
      Subscribers: RyanGlScott, thomie
      Differential Revision: https://phabricator.haskell.org/D2403
      GHC Trac Issues: #12402
    • Ömer Sinan Ağacan's avatar
      Support SCC pragmas in declaration context · 98b2c508
      Ömer Sinan Ağacan authored
      Not having SCCs at the top level is becoming annoying real quick. For
      simplest cases, it's possible to do this transformation:
          f x y = ...
          f = {-# SCC f #-} \x y -> ...
      However, it doesn't work when there's a `where` clause:
          f x y = <t is in scope>
            where t = ...
          f = {-# SCC f #-} \x y -> <t is out of scope>
            where t = ...
      Or when we have a "equation style" definition:
          f (C1 ...) = ...
          f (C2 ...) = ...
          f (C3 ...) = ...
      (usual solution is to rename `f` to `f'` and define a new `f` with a
      This patch implements support for SCC annotations in declaration
      contexts. This is now a valid program:
          f x y = ...
              g z = ...
              {-# SCC g #-}
          {-# SCC f #-}
      Test Plan: This passes slow validate (no new failures added).
      Reviewers: goldfire, mpickering, austin, bgamari, simonmar
      Reviewed By: bgamari, simonmar
      Subscribers: simonmar, thomie, mpickering
      Differential Revision: https://phabricator.haskell.org/D2407
  16. 19 Jul, 2016 1 commit
  17. 16 Jul, 2016 1 commit
  18. 06 Jul, 2016 1 commit
  19. 04 Jul, 2016 1 commit
  20. 01 Jul, 2016 1 commit
  21. 04 Jun, 2016 1 commit
  22. 24 May, 2016 1 commit
    • seraphime's avatar
      Fix: #12084 deprecate old profiling flags · 1956cbf1
      seraphime authored
      Change help message so it doesn't specify -auto-all.
      Make old profiling flags deprecated as they are no longer
      Update Makefile and documentation accordingly.
      Update release notes for ghc 8.2
      Test Plan:
      ./verify; `ghc --help` shouldn't specify the -auto-all
      flag. Furthermore `ghc -fprof -auto-all` should emit a warning
      Reviewed By: thomie, austin
      Differential Revision: https://phabricator.haskell.org/D2257
      GHC Trac Issues: #12084
      Update submodule nofib
  23. 23 May, 2016 1 commit
    • Ben Gamari's avatar
      Revert "compiler/iface: compress .hi files" · 9bb27726
      Ben Gamari authored
      This appears to cause validation issues on,
          TEST="T11108 T9071 T11076 T7600 T7672 T8329 T10420 T10322 T8308 T4114a
          T4114c T10602 T10110 T9204 T2435 T9838 T4114d T10233 T8696 T1735 T5281
          T6056 T10134 T9580 T6018 T9762 T8103"
      With compiler panics of the form,
          Compile failed (status 256) errors were:
          ghc: panic! (the 'impossible' happened)
            (GHC version 8.1.20160523 for x86_64-unknown-linux):
                  Binary.readBinMem: decompression failed
          CallStack (from HasCallStack):
            error, called at compiler/utils/Binary.hs:192:16 in ghc:Binary
          Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
      This reverts commit d9cb7a8a.
  24. 21 May, 2016 1 commit
    • Austin Seipp's avatar
      compiler/iface: compress .hi files · d9cb7a8a
      Austin Seipp authored
      Compress all interface files generated by the compiler with LZ4. While
      being only a tiny amount of code, LZ4 is both fast at compression and
      decompression, and has good compression ratios.
      Non-scientific size test: size of stage2 compiler .hi files:
      `find ./compiler/stage2 -type f -iname '*.hi' -exec du -ch {} + | grep total$`
      Without this patch: 22MB of .hi files for stage2.
      With this patch: 9.2MB of .hi files for stage2.
      Signed-off-by: default avatarAustin Seipp <austin@well-typed.com>
      Reviewed By: bgamari
      Differential Revision: https://phabricator.haskell.org/D1159
  25. 18 May, 2016 1 commit
    • Ben Gamari's avatar
      rts: Add isPinnedByteArray# primop · 310371ff
      Ben Gamari authored
      Adds a primitive operation to determine whether a particular
      `MutableByteArray#` is backed by a pinned buffer.
      Test Plan: Validate with included testcase
      Reviewers: austin, simonmar
      Reviewed By: austin, simonmar
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D2217
      GHC Trac Issues: #12059
  26. 12 May, 2016 1 commit