1. 16 Oct, 2017 13 commits
    • Ben Gamari's avatar
      users-guide: Rework and finish debug flag documentation · 8536b7f8
      Ben Gamari authored
      This documentation was incomplete and not terribly well organized. Given that
      I've spent a lot of time searching through this page, I figured it is perhaps
      worth it to clean it up a bit.
      8536b7f8
    • Ben Gamari's avatar
      rts: Label all threads created by the RTS · 7e790b38
      Ben Gamari authored
      Reviewers: austin, erikd, simonmar
      
      Reviewed By: simonmar
      
      Subscribers: pacak, rwbarton, thomie
      
      Differential Revision: https://phabricator.haskell.org/D4068
      7e790b38
    • Ben Gamari's avatar
      FreeBSD dtrace probe support · 5dab5442
      Ben Gamari authored
      Reviewers: austin, hvr, erikd, simonmar, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: snowleopard, raichoo, rwbarton, thomie, erikd
      
      Differential Revision: https://phabricator.haskell.org/D3994
      5dab5442
    • Edward Z. Yang's avatar
      Levity polymorphic Backpack. · fd8b044e
      Edward Z. Yang authored
      
      
      This patch makes it possible to specify non * kinds of
      abstract data types in signatures, so you can have
      levity polymorphism through Backpack, without the runtime
      representation constraint!
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      
      Test Plan: validate
      
      Reviewers: andrewthad, bgamari, austin, goldfire
      
      Reviewed By: bgamari
      
      Subscribers: goldfire, rwbarton, thomie
      
      GHC Trac Issues: #13955
      
      Differential Revision: https://phabricator.haskell.org/D3825
      fd8b044e
    • Ben Gamari's avatar
      configure: Fix CC version check on Apple compilers · 71a42356
      Ben Gamari authored
      It seems that some Apple LLVM wrappers emit multiple messages containing
      the string "version", which we previously used to find the version
      number.  For instance,
      
          Configured with: --prefix=/Applications/Xcode.app/Contents/...
          Apple LLVM version 9.0.0 (clang-900.0.37)
          Target: x86_64-apple-darwin16.7.0
          Thread model: posix
          InstalledDir: /Applications/Xcode.app/Contents/Developer/...
          Found CUDA installation: /usr/local/cuda, version 8.0
      
      We now take care to only look at the first occurrence of this string.
      
      New `sed` command due to @merijn.
      
      Test Plan: Validate on all the compilers
      
      Reviewers: austin, hvr
      
      Subscribers: rwbarton, thomie, merijn, erikd
      
      Differential Revision: https://phabricator.haskell.org/D4069
      71a42356
    • Herbert Valerio Riedel's avatar
      Implement {set,clear,complement}BitBigNat primitives · 6cc232ae
      Herbert Valerio Riedel authored
      This implements the missing `{set,clear,complement}BitBigNat` primitives
      and hooks them up to `Natural`'s `Bits` instance.
      
      This doesn't yet benefit `Integer`, as we still need "negative" `BigNat`
      variants of those primitives.
      
      Addresses #7860 (partly)
      
      Reviewed By: bgamari
      
      Differential Revision: https://phabricator.haskell.org/D3415
      6cc232ae
    • Herbert Valerio Riedel's avatar
      Enable testing 'Natural' type in TEST=arith011 · 843772b8
      Herbert Valerio Riedel authored
      This now passes thanks to 5984a698 (re #13203)
      843772b8
    • Herbert Valerio Riedel's avatar
      Override default `clearBit` method impl for `Natural` · 5984a698
      Herbert Valerio Riedel authored
      The default implementation of `clearBit` is in terms of
      `complement`. However, `complement` is not well-defined
      for `Natural` and this consequently renders the default
      implementation of `clearBit` dysfunctional.
      
      This implements `clearBit` in terms of `testBit`
      and `setBit` which are both well-defined for `Natural`s.
      
      This addresses #13203
      5984a698
    • Herbert Valerio Riedel's avatar
      Implement new `compareByteArrays#` primop · e3ba26f8
      Herbert Valerio Riedel authored
      The new primop
      
          compareByteArrays# :: ByteArray# -> Int# {- offset -}
                             -> ByteArray# -> Int# {- offset -}
                             -> Int# {- length -}
                             -> Int#
      
      allows to compare the subrange of the first `ByteArray#` to
      the (same-length) subrange of the second `ByteArray#` and returns a
      value less than, equal to, or greater than zero if the range is found,
      respectively, to be byte-wise lexicographically less than, to match,
      or be greater than the second range.
      
      Under the hood, the new primop is implemented in terms of the standard
      ISO C `memcmp(3)` function. It is currently an out-of-line primop but
      work is underway to optimise this into an inline primop for a future
      follow-up Differential (see D4091).
      
      This primop has applications in packages like `text`, `text-short`,
      `bytestring`, `text-containers`, `primitive`, etc.  which currently
      have to incur the overhead of an ordinary FFI call to directly or
      indirectly invoke `memcmp(3)` as well has having to deal with some
      `unsafePerformIO`-variant.
      
      While at it, this also improves the documentation for the existing
      `copyByteArray#` primitive which has a non-trivial type-signature
      that significantly benefits from a more explicit description of its
      arguments.
      
      Reviewed By: bgamari
      
      Differential Revision: https://phabricator.haskell.org/D4090
      e3ba26f8
    • Herbert Valerio Riedel's avatar
      Fix panic for `ByteArray#` arguments in CApiFFI foreign imports · add85cc2
      Herbert Valerio Riedel authored
      Declarations such as
      
        foreign import capi  unsafe "string.h strlen"
            c_strlen_capi :: ByteArray# -> IO CSize
      
        foreign import capi  unsafe "string.h memset"
            c_memset_capi :: MutableByteArray# s -> CInt -> CSize -> IO ()
      
      would cause GHC to panic because the CApiFFI c-wrapper generator didn't
      know what C type to use for `(Mutable)ByteArray#` types (unlike the
      `ccall` codepath).
      
      This addresses #9274
      
      Reviewed By: bgamari
      
      Differential Revision: https://phabricator.haskell.org/D4092
      add85cc2
    • Peter Trommler's avatar
      Fix typo · 6aa6a86b
      Peter Trommler authored
      6aa6a86b
    • Peter Trommler's avatar
      Fix typo · afac6b11
      Peter Trommler authored
      afac6b11
    • Simon Marlow's avatar
      Fix calculation in threadStackOverflow · 8adb84fe
      Simon Marlow authored
      Summary:
      The calculation was too conservative, and could result in copying zero
      frames into the new stack chunk, which caused a knock-on failure in
      the interpreter.
      
      Test Plan: Tested on an in-house repro (not shareable, unfortunately)
      
      Reviewers: niteria, bgamari, austin, erikd
      
      Subscribers: rwbarton, thomie
      
      Differential Revision: https://phabricator.haskell.org/D4052
      8adb84fe
  2. 15 Oct, 2017 1 commit
  3. 13 Oct, 2017 1 commit
    • Ryan Scott's avatar
      Delete obsolete docs on GADT interacton with TypeApplications · 2be55b85
      Ryan Scott authored
      Even since ef26182e, this section of
      the users' guide is wrong, as there are no longer special rules for
      the order of type variables in GADT constructors' type signatures
      vis-à-vis visible type application. As a result, this section can
      simply be deleted, as there is no longer anything interesting to say
      about the topic.
      2be55b85
  4. 12 Oct, 2017 4 commits
    • Simon Peyton Jones's avatar
      Re-apply "Typeable: Allow App to match arrow types" · 3de788c4
      Simon Peyton Jones authored
      This re-applies
       commit cc6be3a2
        Author: Ben Gamari <bgamari.foss@gmail.com>
        Date:   Tue Sep 19 18:57:38 2017 -0400
      
          Typeable: Allow App to match arrow types
      
      which was reverted because of Trac #14270.  Now the latter is
      fixed we can re-apply it.
      
      The original ticket was Trac #14236
      3de788c4
    • Simon Peyton Jones's avatar
      Do not bind coercion variables in SpecConstr rules · fb050a33
      Simon Peyton Jones authored
      Trac #14270 showed that SpecConstr could cause nasty Lint failures
      if it generates a RULE that binds coercion varables.  See
      
       * Note [SpecConstr and casts], and
       * the test simplCore/should_compile/T14270.
      
      This doesn't feel like the final word to me, because somehow the
      specialisation "ought" to work.  So I left in a debug WARN to yell if
      the new check acutally fires.
      
      Meanwhile, it stops the erroneous specialisation.
      
      binding coercion
      fb050a33
    • Simon Peyton Jones's avatar
      Add missing T14325.stderr · 15aefb48
      Simon Peyton Jones authored
      15aefb48
    • Simon Peyton Jones's avatar
      Do not quantify over deriving clauses · 82b77ec3
      Simon Peyton Jones authored
      Trac #14331 showed that in a data type decl like
      
         data D = D deriving (C (a :: k))
      
      we were quantifying D over the 'k' in the deriving clause.  Yikes.
      
      Easily fixed, by deleting code in RnTypes.extractDataDefnKindVars
      
      See the discussion on the ticket, esp comment:8.
      82b77ec3
  5. 11 Oct, 2017 11 commits
  6. 10 Oct, 2017 1 commit
    • Tamar Christina's avatar
      Split SysTools up some · e51e565d
      Tamar Christina authored
      Summary:
      SysTools and DriverTools have an annoying mutual dependency.
      They also each contain pieces of the linker. In order for
      changes to be shared between the library and the exe linking
      code this dependency needs to be broken in order to avoid
      using hs-boot files.
      
      Reviewers: austin, bgamari, erikd
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, thomie
      
      Differential Revision: https://phabricator.haskell.org/D4071
      e51e565d
  7. 07 Oct, 2017 3 commits
    • Ryan Scott's avatar
      Simply Data instance context for AmbiguousFieldOcc · f337a208
      Ryan Scott authored
      The current, verbose instance context can be compacted into
      `DataId pass`. Indeed, that's what most of the `Data` instances
      in this module already do, so this just makes things consistent.
      f337a208
    • Ryan Scott's avatar
      Fix #14320 by looking through HsParTy in more places · f1d2db68
      Ryan Scott authored
      Summary:
      GHC was needlessly rejecting GADT constructors' type
      signatures that were surrounded in parentheses due to the fact that
      `splitLHsForAllTy` and `splitLHsQualTy` (which are used to check as
      part of checking if GADT constructor return types are correct)
      weren't looking through parentheses (i.e., `HsParTy`). This is
      easily fixed, though.
      
      Test Plan: make test TEST=T14320
      
      Reviewers: austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, thomie
      
      GHC Trac Issues: #14320
      
      Differential Revision: https://phabricator.haskell.org/D4072
      f1d2db68
    • Ryan Scott's avatar
      Incorporate changes from #11721 into Template Haskell · 341d3a78
      Ryan Scott authored
      Summary:
      #11721 changed the order of type variables in GADT
      constructor type signatures, but these changes weren't reflected in
      Template Haskell reification of GADTs. Let's do that.
      
      Along the way, I:
      
      * noticed that the `T13885` test was claiming to test TH reification
        of GADTs, but the reified data type wasn't actually a GADT! Since
        this patch touches that part of the codebase, I decided to fix
        this.
      * incorporated some feedback from @simonpj in
        https://phabricator.haskell.org/D3687#113566. (These changes alone
        don't account for any different in behavior.)
      
      Test Plan: make test TEST=T11721_TH
      
      Reviewers: goldfire, austin, bgamari, simonpj
      
      Reviewed By: goldfire, bgamari, simonpj
      
      Subscribers: rwbarton, thomie, simonpj
      
      GHC Trac Issues: #11721
      
      Differential Revision: https://phabricator.haskell.org/D4070
      341d3a78
  8. 06 Oct, 2017 1 commit
  9. 05 Oct, 2017 2 commits
  10. 04 Oct, 2017 2 commits
  11. 03 Oct, 2017 1 commit