Skip to content
Snippets Groups Projects
  1. Nov 20, 2017
  2. Nov 16, 2017
  3. Nov 08, 2017
  4. Nov 06, 2017
  5. Oct 30, 2017
  6. Oct 27, 2017
    • 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)
      704cbae2
  7. Oct 26, 2017
  8. Oct 24, 2017
  9. Oct 16, 2017
    • Ben Gamari's avatar
      rts/posix: Ensure that memory commit succeeds · cb7f91db
      Ben Gamari authored and Ben Gamari's avatar Ben Gamari committed
      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)
      cb7f91db
    • Herbert Valerio Riedel's avatar
      Fix panic for `ByteArray#` arguments in CApiFFI foreign imports · 95c1feeb
      Herbert Valerio Riedel authored and Ben Gamari's avatar Ben Gamari committed
      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)
      95c1feeb
    • Herbert Valerio Riedel's avatar
      Enable testing 'Natural' type in TEST=arith011 · 0a763ba2
      Herbert Valerio Riedel authored and Ben Gamari's avatar Ben Gamari committed
      This now passes thanks to 5984a698 (re #13203)
      
      (cherry picked from commit 843772b8)
      0a763ba2
    • Herbert Valerio Riedel's avatar
      Override default `clearBit` method impl for `Natural` · 3de07dcf
      Herbert Valerio Riedel authored and Ben Gamari's avatar Ben Gamari committed
      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)
      3de07dcf
    • 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)
      f0b46f3e
    • 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)
      35f85046
  10. Oct 11, 2017
  11. Oct 10, 2017
    • 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
      solver.
      
      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
      loop.
      
      A bit of other refactoring, notably moving isTyFamFree
      from TcValidity to TcType
      
      (cherry picked from commit a8fde183)
      04613055
  12. Oct 03, 2017
  13. Oct 02, 2017
  14. Sep 30, 2017
    • Ben Gamari's avatar
      Use libpthread instead of libthr on FreeBSD · fd201db6
      Ben Gamari authored and Ben Gamari's avatar Ben Gamari committed
      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
      complain).
      
      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)
      fd201db6
  15. Sep 29, 2017
    • Ben Gamari's avatar
      configure: Make sure we try all possible linkers · 5bce35ca
      Ben Gamari authored and Ben Gamari's avatar Ben Gamari committed
      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)
      5bce35ca
    • 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)
      ghc-8.2.2-rc1
      e84d76d3
  16. Sep 28, 2017
    • Simon Marlow's avatar
      mkDataConRep: fix bug in strictness signature (#14290) · a0671e2d
      Simon Marlow authored and Ben Gamari's avatar Ben Gamari committed
      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)
      a0671e2d
  17. Sep 27, 2017
Loading