1. 03 Oct, 2015 10 commits
    • Ben Gamari's avatar
      testsuite: Bump up haddock.base expected allocations · d2fb5328
      Ben Gamari authored
      This started intermittently failing as a result of D1239.
      I suspect this was just the straw that broke the camel's back however.
    • Ryan Scott's avatar
      Fill in associated type defaults with DeriveAnyClass · 2f74be9c
      Ryan Scott authored
      Unlike `-XDefaultSignatures`, `-XDeriveAnyClass` would not fill in
      associated type family defaults when deriving a class which contained
      In order to fix this properly, `tcATDefault` needed to be used from
      `TcGenDeriv`. To avoid a module import cycle, `tcATDefault` was moved
      from `TcInstDcls` to `TcClsDcl`.
      Fixes #10361.
      Test Plan: ./validate
      Reviewers: kosmikus, dreixel, bgamari, austin, simonpj
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D1283
      GHC Trac Issues: #10361
    • Herbert Valerio Riedel's avatar
      Enable `Enumeration is empty` warnings for `Integer` · 0eb8fcd9
      Herbert Valerio Riedel authored
      This warning was implemented via
      abb3a9fa for addressing #7881. The
      bounded H2010 integral types were handled, but the `Integer` type was
      missed for the enumeration warning.
      Fixes #10929
      Test Plan: reused T7881 testcase
      Reviewers: thomie, bgamari, austin
      Reviewed By: thomie, bgamari, austin
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D1305
      GHC Trac Issues: #10929
    • Ryan Scott's avatar
      Make GHC generics capable of handling unboxed types · 6cde981a
      Ryan Scott authored
      This adds a data family (`URec`) and six data family instances (`UAddr`,
      `UChar`, `UDouble`, `UFloat`, `UInt`, and `UWord`) which a `deriving
      Generic(1)` clause will generate if it sees `Addr#`, `Char#`, `Double#`,
      `Float#`, `Int#`, or `Word#`, respectively. The programmer can then
      provide instances for these data family instances to provide custom
      implementations for unboxed types, similar to how derived `Eq`, `Ord`,
      and `Show` instances currently special-case unboxed types.
      Fixes #10868.
      Test Plan: ./validate
      Reviewers: goldfire, dreixel, bgamari, austin, hvr, kosmikus
      Reviewed By: dreixel, kosmikus
      Subscribers: simonpj, thomie
      Differential Revision: https://phabricator.haskell.org/D1239
      GHC Trac Issues: #10868
    • thomie's avatar
      Testsuite: update expected output for T8602 · a96f1acc
      thomie authored
    • thomie's avatar
      Build system: add mk/validate.mk.sample · a3c78abc
      thomie authored
      Reviewers: austin, bgamari
      Subscribers: erikd
      Differential Revision: https://phabricator.haskell.org/D1303
      	modified:   configure.ac
    • Tamar Christina's avatar
      Fix broken validation Build 6564 and accepting a few other test results · c4d7df04
      Tamar Christina authored
      Test Plan: ./validate
      Reviewers: thomie, austin, bgamari
      Reviewed By: bgamari
      Subscribers: #ghc_windows_task_force
      Differential Revision: https://phabricator.haskell.org/D1304
    • Tamar Christina's avatar
      Prevent GHC from silently dying when preprocessor is not found · b6f76b9a
      Tamar Christina authored
      The Windows preprocessor code calls `runInteractiveProcess` but does
      not check if an exception is thrown.
      `runInteractiveProcess` calls `CreateProcess` which when given a format
      the system loader does not know about
      will throw an exception. This is what makes #9399 fail.
      Ultimately we should not use any `CreateProcess` based calls but
      instead `ShellExecuteEx` as  this would allow
      us to run applications that the shell knows about instead of just the
      loader. More details on #365.
      This patch removes `PhaseFailed` and throws `ProgramError` instead.
      `PhaseFailed` was largely unneeded since it never gave
      very useful information aside from the `errorcode` which was almost
      always `1`. `IOErrors` have also been eliminated and `GhcExceptions`
      thrown in their place wherever possible.
      Updates haddock submodule.
      Test Plan:
      `./validate` to make sure anything didn't break and
      `make TESTS="T365"` to test that an error is now properly thrown
      Reviewers: austin, thomie, bgamari
      Reviewed By: thomie, bgamari
      Subscribers: #ghc_windows_task_force
      Differential Revision: https://phabricator.haskell.org/D1256
      GHC Trac Issues: #365
    • Ben Gamari's avatar
      docs: Fix ghc_config.py.in · 93e21b96
      Ben Gamari authored
    • Ben Gamari's avatar
      Move user's guide to ReStructuredText · 4fd6207e
      Ben Gamari authored
  2. 02 Oct, 2015 11 commits
    • Edward Z. Yang's avatar
      Don't use old linkable for hs-boot files. · 9ed700bb
      Edward Z. Yang authored
      We should only use the old linkable when the really is nothing
      to be done.  In the case of hs-boot, there should just not be
      a linkable.
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      Test Plan: validate
      Reviewers: austin, bgamari
      Reviewed By: bgamari
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D1301
    • Andreas Schwab's avatar
      Fix signature of atomic builtins · e3d2bab8
      Andreas Schwab authored
      This patch is due to Andreas Schwab.
      This fixes #10926, which reports (on AArch64) errors of the form,
      /tmp/ghc1492_0/ghc_1.hc:2844:25: warning: passing argument 1 of
      'hs_atomic_xor64' makes pointer from integer without a cast
           _c1Ho = hs_atomic_xor64((*Sp) + (((Sp[1]) << 0x3UL) + 0x10UL), Sp[2]);
      In file included from
      /home/abuild/rpmbuild/BUILD/ghc-7.10.2/includes/Stg.h:273:0: 0,
                       from /tmp/ghc1492_0/ghc_1.hc:3:
           note: expected 'volatile StgWord64 *
                 {aka volatile long unsigned int *}'
                 but argument is of type 'long unsigned int'
           StgWord64 hs_atomic_xor64(volatile StgWord64 *x, StgWord64 val);
      Test Plan: Validate
      Reviewers: austin, simonmar
      Reviewed By: simonmar
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D1300
      GHC Trac Issues: #10926
    • Ben Gamari's avatar
      Move CallStack back to base · 74424346
      Ben Gamari authored
      CallStack requires tuples, instances of which are defined in GHC.Tuple.
      Unfortunately the change made in D757 to the `Typeable` deriving
      mechanism means that `GHC.Tuple` must import `GHC.Types` for types
      necessary to generate type representations.  This results in a cycle.
      Test Plan: Validate
      Reviewers: gridaphobe, austin, hvr
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D1298
    • Ben Gamari's avatar
      LLVM: Factor out accumulation of LLVM statements and variables · 95394085
      Ben Gamari authored
      The LLVM code generator currently has a rather large amount of
      boilerplate devoted to piping around and building up various AST
      elements. This is rather unfortunate for a language which prides itself
      on ease of abstraction and detracts from readability.
      Here I continue a refactoring that I originally suggested in D991, using
      `WriterT` to factor out this pattern. `WriterT` is in general a bit
      problematic from an evaluation perspective, but the expressions here are
      small enough that it should be a problem in practice.
      Test Plan: Validate
      Reviewers: austin
      Reviewed By: austin
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D1286
    • Ben Gamari's avatar
      LLVM: Implement atomic operations in terms of LLVM primitives · bd41eb2a
      Ben Gamari authored
      This fixes Trac #7883.
      This adds proper support for,
        * `MO_AtomicRMW`
        * `MO_AtomicWrite`
        * `MO_CmpXChg`
      Test Plan: Validate
      Reviewers: rrnewton, austin
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D1282
      GHC Trac Issues: #7883
    • Peter Trommler's avatar
      nativeGen PPC: fix > 16 bit offsets in stack handling · b29f20ed
      Peter Trommler authored
      Implement access to spill slots at offsets larger than 16 bits.
      Also allocation and deallocation of spill slots was restricted to
      16 bit offsets. Now 32 bit offsets are supported on all PowerPC
      The implementation of 32 bit offsets requires more than one instruction
      but the native code generator wants one instruction. So we implement
      pseudo-instructions that are pretty printed into multiple assembly
      With pseudo-instructions for spill slot allocation and deallocation
      we can also implement handling of the back chain pointer according
      to the ELF ABIs.
      Test Plan: validate (especially on powerpc (32 bit))
      Reviewers: bgamari, austin, erikd
      Reviewed By: erikd
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D1296
      GHC Trac Issues: #7830
    • Matthias Fischmann's avatar
      Document peculiarities of `traceM`. · 57e3742c
      Matthias Fischmann authored
      Reviewers: bgamari, hvr, austin
      Reviewed By: bgamari, hvr, austin
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D1289
    • Ben Gamari's avatar
      Fix treatment of -0.0 · eb975d2e
      Ben Gamari authored
      Here we fix a few mis-optimizations that could occur in code with
      floating point comparisons with -0.0. These issues arose from our
      insistence on rewriting equalities into case analyses and the
      simplifier's ignorance of floating-point semantics.
      For instance, in Trac #10215 (and the similar issue Trac #9238) we
      turned `ds == 0.0` into a case analysis,
      case ds of
          __DEFAULT -> ...
          0.0 -> ...
      Where the second alternative matches where `ds` is +0.0 and *also* -0.0.
      However, the simplifier doesn't realize this and will introduce a local
      inlining of `ds = -- +0.0` as it believes this is the only
      value that matches this pattern.
      Instead of teaching the simplifier about floating-point semantics
      we simply prohibit case analysis on floating-point scrutinees and keep
      this logic in the comparison primops, where it belongs.
      We do several things here,
       - Add test cases from relevant tickets
       - Clean up a bit of documentation
       - Desugar literal matches against floats into applications of the
         appropriate equality primitive instead of case analysis
       - Add a CoreLint to ensure we don't pattern match on floats in Core
      Test Plan: validate with included testcases
      Reviewers: goldfire, simonpj, austin
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D1061
      GHC Trac Issues: #10215, #9238
    • Joachim Breitner's avatar
      Update nofib submodule again · a52db231
      Joachim Breitner authored
      reverting my bogus commit there.
    • Joachim Breitner's avatar
      Update nofib submodule · f2a174ae
      Joachim Breitner authored
      to contain these commits:
         commit 8bffe3cb01ce404ab493de2b4316f2c1c4a9bda9
         Author: Joachim Breitner <mail@joachim-breitner.de>
         Date:   Fri Oct 2 10:09:17 2015 +0200
             Expected output of mandel when run under valgrind
             probably due to rounding/floating point precision numbers. It looks
             broken, but so does the existing file spectral/mandel/mandel.stdout-mingw.
         commit f9a577973edf6976e4c0703bf2afac900d7b6fd8
         Author: Gabor Greif <ggreif@gmail.com>
         Date:   Fri Jul 31 00:43:38 2015 +0200
             Typos in comments
         commit 20ae9113ad31eca426883544f597a3cae9b60d94
         Author: Simon Peyton Jones <simonpj@microsoft.com>
         Date:   Fri Apr 24 15:10:02 2015 +0100
             Add exact-real-arithmetic benchmark from David Lester
    • Herbert Valerio Riedel's avatar
      Add Data.Semigroup and Data.List.NonEmpty (re #10365) · 03b38042
      Herbert Valerio Riedel authored
      This implements phase 1 of the semigroup-as-monoid-superclass
      proposal (https://ghc.haskell.org/wiki/Proposal/SemigroupMonoid).
      The modules were migrated from the `semigroups-0.17` release mostly
      as-is, except for dropping several trivial `{-# INLINE #-}`s,
      removing CPP usage, and instances for types & classes provided
      outside of `base` (e.g. `containers`, `deepseq`, `hashable`, `tagged`,
      `bytestring`, `text`)
      Differential Revision: https://phabricator.haskell.org/D1284
  3. 01 Oct, 2015 1 commit
  4. 30 Sep, 2015 2 commits
  5. 28 Sep, 2015 1 commit
    • Joachim Breitner's avatar
      Allow enumDeltaIntegerFB to be inlined · 78053f44
      Joachim Breitner authored
      The function is very small and the compiler should be at liberty to
      inline it. But it is recursive, so it did not do it before. By applying
      the usual transformation with a local recursive function, GHC can now
      inline it, producing the loop that one would expect.
  6. 26 Sep, 2015 2 commits
    • Ömer Sinan Ağacan's avatar
      reify associated types when reifying typeclasses(#10891) · b4d43b4e
      Ömer Sinan Ağacan authored
      As reported in Trac #10891, Template Haskell's `reify` was not
      generating Decls for associated types. This patch fixes that.
      Note that even though `reifyTyCon` function used in this patch returns
      some type instances, I'm ignoring that.
      Here's an example of how associated types are encoded with this patch:
      (Simplified representation)
          class C a where
            type F a :: *
          OpenTypeFamilyD "F" ["a"]
      With default type instances:
          class C a where
            type F a :: *
            type F a = a
          OpenTypeFamilyD "F" ["a"]
          TySynInstD "F" (TySynEqn [VarT "a"] "a")
      Test Plan:
      This patch was already reviewed and even merged. The patch is later
      reverted because apparently it broke the build some time between the
      validation of this patch and merge. Creating this new ticket to fix the
      Reviewers: goldfire, austin, bgamari
      Reviewed By: bgamari
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D1277
      GHC Trac Issues: #10891
    • Ben Gamari's avatar
      rts: Clean up whitespace in Trace.h · 988b2baa
      Ben Gamari authored
  7. 25 Sep, 2015 5 commits
  8. 24 Sep, 2015 5 commits
  9. 23 Sep, 2015 3 commits