1. 06 Nov, 2017 1 commit
  2. 30 Oct, 2017 3 commits
  3. 27 Oct, 2017 1 commit
    • Simon Peyton Jones's avatar
      Deal with JoinIds before void types · 704cbae2
      Simon Peyton Jones authored
      Trac #13394, comment:4 showed up another place where we were testing
      for the representation of of a type; and it turned out to be a JoinId
      which can be rep-polymorphic.
      Just putting the test in the right places solves this easily.
      (cherry picked from commit bc0f3abd)
  4. 26 Oct, 2017 1 commit
  5. 24 Oct, 2017 2 commits
  6. 16 Oct, 2017 6 commits
    • Ben Gamari's avatar
      rts/posix: Ensure that memory commit succeeds · cb7f91db
      Ben Gamari authored
      Previously we wouldn't check that mmap would succeed. I suspect this may
      have been the cause of #14329.
      Test Plan: Validate under low-memory condition
      Reviewers: simonmar, austin, erikd
      Reviewed By: simonmar
      Subscribers: rwbarton, thomie
      GHC Trac Issues: #14329
      Differential Revision: https://phabricator.haskell.org/D4075
      (cherry picked from commit a69fa544)
    • Herbert Valerio Riedel's avatar
      Fix panic for `ByteArray#` arguments in CApiFFI foreign imports · 95c1feeb
      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
      (cherry picked from commit add85cc2)
    • Herbert Valerio Riedel's avatar
      Enable testing 'Natural' type in TEST=arith011 · 0a763ba2
      Herbert Valerio Riedel authored
      This now passes thanks to 5984a698 (re #13203)
      (cherry picked from commit 843772b8)
    • Herbert Valerio Riedel's avatar
      Override default `clearBit` method impl for `Natural` · 3de07dcf
      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
      (cherry picked from commit 5984a698)
    • Simon Peyton Jones's avatar
      Do not quantify over deriving clauses · f0b46f3e
      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.
      (cherry picked from commit 82b77ec3)
    • Simon Peyton Jones's avatar
      Fix nasty bug in w/w for absence analysis · 35f85046
      Simon Peyton Jones authored
      This dark corner was exposed by Trac #14285.  It involves the
      interaction between absence analysis and INLINABLE pragmas.
      There is a full explanation in Note [aBSENT_ERROR_ID] in MkCore,
      which you can read there.  The changes in this patch are
      * Make exprIsHNF return True for absentError, treating
        absentError like an honorary data constructor.
      * Make absentError /not/ be diverging, unlike other error Ids.
      This is all a bit horrible.
      * While doing this I found that exprOkForSpeculation didn't
        have a case for value lambdas so I added one.  It's not
        really called on lifted types much, but it seems like the
        right thing
      (cherry picked from commit dbbee1ba)
  7. 11 Oct, 2017 2 commits
  8. 10 Oct, 2017 1 commit
    • Simon Peyton Jones's avatar
      Fix bug in the short-cut solver · 04613055
      Simon Peyton Jones authored
      Trac #13943 showed that the relatively-new short-cut solver
      for class constraints (aka -fsolve-constant-dicts) was wrong.
      In particular, see "Type families" under Note [Shortcut solving]
      in TcInteract.
      The short-cut solver recursively solves sub-goals, but it doesn't
      flatten type-family applications, and as a result it erroneously
      thought that C (F a) cannot possibly match (C 0), which is
      simply untrue.  That led to an inifinte loop in the short-cut
      The significant change is the one line
      +                 , all isTyFamFree preds  -- See "Type families" in
      +                                          -- Note [Shortcut solving]
      but, as ever, I do some other refactoring.  (E.g. I changed the
      name of the function to shortCutSolver rather than the more
      generic trySolveFromInstance.)
      I also made the short-cut solver respect the solver-depth limit,
      so that if this happens again it won't just produce an infinite
      A bit of other refactoring, notably moving isTyFamFree
      from TcValidity to TcType
      (cherry picked from commit a8fde183)
  9. 03 Oct, 2017 5 commits
    • Edward Z. Yang's avatar
      Include libraries which fill holes as deps when linking. · 876fec04
      Edward Z. Yang authored
      Fixes the issue reported at https://github.com/haskell/cabal/issues/4755
      and fixes #14304 in the GHC tracker.
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      Test Plan: validate
      Reviewers: bgamari, austin, goldfire
      Reviewed By: bgamari
      Subscribers: rwbarton, thomie
      GHC Trac Issues: #14304
      Differential Revision: https://phabricator.haskell.org/D4057
      (cherry picked from commit f3f624ae)
    • Takenobu Tani's avatar
      user-guide: fix examples of ghci commands · 83e438ee
      Takenobu Tani authored
      Fix examples of ghci commands:
        * correct typos
        * add top-level binding without let statement
        * modify Time.getClockTime to Data.Time.getZonedTime
        * modify Directory.setCurrentDirectory
        * modify ghc version number
      Test Plan: build
      Reviewers: austin, bgamari
      Reviewed By: bgamari
      Subscribers: rwbarton, thomie
      Differential Revision: https://phabricator.haskell.org/D3852
      (cherry picked from commit 33856696)
    • Takenobu Tani's avatar
      user-guide: add `:type +d` and `:type +v` in release highlight · 61c7b3d4
      Takenobu Tani authored
      Add new ghci command to release highlight and fix link anchor.
      This commit is for ghc-8.2 branch.
      Test Plan: build
      Reviewers: austin, bgamari
      Reviewed By: bgamari
      Subscribers: rwbarton, thomie
      GHC Trac Issues: #11975
      Differential Revision: https://phabricator.haskell.org/D3850
      (cherry picked from commit 82ee71fa)
    • Ben Gamari's avatar
      Model divergence of retry# as ThrowsExn, not Diverges · 6a328506
      Ben Gamari authored
      The demand signature of the retry# primop previously had a Diverges
      result.  However, this caused the demand analyser to conclude that a
      program of the shape,
          catchRetry# (... >> retry#)
      would diverge. Of course, this is plainly wrong; catchRetry#'s sole
      reason to exist is to "catch" the "exception" thrown by retry#. While
      catchRetry#'s demand signature correctly had the ExnStr flag set on its
      first argument, indicating that it should catch divergence, the logic
      associated with this flag doesn't apply to Diverges results. This
      resulted in #14171.
      The solution here is to treat the divergence of retry# as an exception.
      Namely, give it a result type of ThrowsExn rather than Diverges.
      Updates stm submodule for tests.
      Test Plan: Validate with T14171
      Reviewers: simonpj, austin
      Subscribers: rwbarton, thomie
      GHC Trac Issues: #14171, #8091
      Differential Revision: https://phabricator.haskell.org/D3919
      (cherry picked from commit 10a1a478)
    • niteria's avatar
      [RTS] Make -po work · 18d66feb
      niteria authored
      db2a6676 added `-po` option, but
      the part that parses it was missing.
      Test Plan:
      On a simple file:
      ./inplace/bin/ghc-stage2 A.hs -prof -main-is A; ./A +RTS -P -potest
      produced test.prof file and didn't produce A.prof file.
      ./A +RTS -P
      produced A.prof file
      Reviewers: simonmar, bgamari, austin, erikd
      Reviewed By: bgamari
      Subscribers: rwbarton, thomie
      Differential Revision: https://phabricator.haskell.org/D3946
      (cherry picked from commit b6b56dd1)
  10. 02 Oct, 2017 4 commits
  11. 30 Sep, 2017 1 commit
    • Ben Gamari's avatar
      Use libpthread instead of libthr on FreeBSD · fd201db6
      Ben Gamari authored
      Since #847 we have used libthr due to reported hangs with FreeBSD's
      KSE-based M:N pthread implementation. However, this was nearly 12 years
      ago and today libpthread seems to work fine. Moreover, adding -lthr to
      the linker flags break when used in conjunction with -r when gold is
      used (since -l and -r are incompatible although BFD ld doesn't
      Test Plan: Validate on FreeBSD
      Reviewers: kgardas, austin
      Subscribers: rwbarton, thomie
      GHC Trac Issues: #847
      Differential Revision: https://phabricator.haskell.org/D3773
      (cherry picked from commit d8051c6c)
  12. 29 Sep, 2017 2 commits
    • Ben Gamari's avatar
      configure: Make sure we try all possible linkers · 5bce35ca
      Ben Gamari authored
      Previously if we had both ld.lld and ld.gold installed but a gcc which
      didn't support -fuse-ld=lld we would fail when trying ld.lld and fall
      immediately back to plain ld. Now we will try ld.gold as well. This was
      brought to light by #14280, where using ld.bfd resulted in a broken
      stage2 compiler.
      Test Plan: Configure
      Reviewers: angerman, hvr, austin
      Reviewed By: angerman
      Subscribers: rwbarton, thomie, erikd
      GHC Trac Issues: #14280
      Differential Revision: https://phabricator.haskell.org/D4038
      (cherry picked from commit a10729f0)
    • Ben Gamari's avatar
      includes/rts: Drop trailing comma · e84d76d3
      Ben Gamari authored
      This trailing comma snuck in in a recent patch. There is nothing wrong with the
      comma; it's perfectly valid C99, yet nevertheless Mac OS X's dtrace utility
      chokes on it with,
          dtrace: failed to compile script rts/RtsProbes.d:
                  "includes/rts/EventLogFormat.h", line 245: syntax error near "}"
          make[1]: *** [rts/dist/build/RtsProbes.h] Error 1
      (cherry picked from commit be514a69)
  13. 28 Sep, 2017 1 commit
    • Simon Marlow's avatar
      mkDataConRep: fix bug in strictness signature (#14290) · a0671e2d
      Simon Marlow authored
      The strictness signature for a data con wrapper wasn't including any
      dictionary arguments, which meant that bangs on the fields of a
      constructor with an existential context would be moved to the wrong
      fields.  See T14290 for an example.
      Test Plan:
      * New test T14290
      * validate
      Reviewers: simonpj, niteria, austin, bgamari, erikd
      Reviewed By: simonpj, bgamari
      Subscribers: rwbarton, thomie
      GHC Trac Issues: #14290
      Differential Revision: https://phabricator.haskell.org/D4040
      (cherry picked from commit 5935acdb)
  14. 27 Sep, 2017 4 commits
  15. 26 Sep, 2017 5 commits
  16. 19 Sep, 2017 1 commit