Skip to content
Snippets Groups Projects
  1. Oct 13, 2018
  2. Oct 08, 2018
  3. Oct 05, 2018
    • Ben Gamari's avatar
      Bump text submodule · bdf00d38
      Ben Gamari authored
      This introduces the fix for https://github.com/haskell/text/pull/229.
      bdf00d38
    • Herbert Valerio Riedel's avatar
      Add support for opting out of package environments · 84c250b4
      Herbert Valerio Riedel authored and Ben Gamari's avatar Ben Gamari committed
      This implements the first part proposed in #13753:
      
      Define a special magic "null" environment, which instructs GHC to ignore
      any package environment files. To this end, I propose to use the name
      `-` (i.e. a single dash), as that is more portable than using the empty
      string for environment variables. In other words, a
      
      - `-package-env -` CLI flag, or a
      - `GHC_ENVIRONMENT=-` env var (unless a `-package-env` flag is present)
      
      would inhibit GHC from looking up and interpreting any package
      environment files from the filesystem; this is the equivalent of
      `-ignore-dot-ghci` for package environment files.
      
      Reviewers: bgamari
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, thomie, carter
      
      GHC Trac Issues: #13753
      
      Differential Revision: https://phabricator.haskell.org/D4690
      
      (cherry picked from commit 8f3c149d)
      84c250b4
    • Ben Gamari's avatar
      base: Make Foreign.Marshal.Alloc.allocBytes[Aligned] NOINLINE · d86ab8df
      Ben Gamari authored
      As noted in #14346, touch# may be optimized away when the simplifier can see
      that the continuation passed to allocaBytes will not return. Marking CPS-style
      functions with NOINLINE ensures that the simplier can't draw any unsound
      conclusions.
      
      Ultimately the right solution here will be to do away with touch# and instead
      introduce a scoped primitive as is suggested in #14375.
      
      Note: This was present in 8.2 but was never merged to 8.4 in hopes that
      we would have #14375 implemented in time. This meant that the issue
      regressed again in 8.4. Thankfully we caught it in time to fix it for
      8.6.
      
      (cherry picked from commit 404bf05e)
      (cherry picked from commit 56590db0)
      d86ab8df
  4. Aug 21, 2018
    • Ryan Scott's avatar
      Be mindful of GADT tyvar order when desugaring record updates · 1a6d7c18
      Ryan Scott authored
      After commit ef26182e,
      the type variable binders in GADT constructor type signatures
      are now quantified in toposorted order, instead of always having
      all the universals before all the existentials. Unfortunately, that
      commit forgot to update some code (which was assuming the latter
      scenario) in `DsExpr` which desugars record updates. This wound
      up being the cause of #15499.
      
      This patch makes up for lost time by desugaring record updates in
      a way such that the desugared expression applies type arguments to
      the right-hand side constructor in the correct order—that is, the
      order in which they were quantified by the user.
      
      Test Plan: make test TEST=T15499
      
      Reviewers: simonpj, bgamari
      
      Reviewed By: simonpj
      
      Subscribers: rwbarton, carter
      
      GHC Trac Issues: #15499
      
      Differential Revision: https://phabricator.haskell.org/D5060
      
      (cherry picked from commit 63b6a1d4)
      1a6d7c18
  5. Aug 06, 2018
  6. Jul 30, 2018
    • Ben Gamari's avatar
      base: Make Foreign.Marshal.Alloc.allocBytes[Aligned] NOINLINE · 575caf56
      Ben Gamari authored
      As noted in #14346, touch# may be optimized away when the simplifier can see
      that the continuation passed to allocaBytes will not return. Marking CPS-style
      functions with NOINLINE ensures that the simplier can't draw any unsound
      conclusions.
      
      Ultimately the right solution here will be to do away with touch# and instead
      introduce a scoped primitive as is suggested in #14375.
      
      (cherry picked from commit 404bf05e)
      (cherry picked from commit 7409e28c513054b735b6a86dfab4fdab212aaf8f)
      575caf56
  7. May 21, 2018
  8. May 20, 2018
    • Ben Gamari's avatar
      daa4de1f
    • Ben Gamari's avatar
      Set RELEASE=YES, version 8.4.3 · c70d515e
      Ben Gamari authored
      c70d515e
    • Simon Marlow's avatar
      storageAddCapabilities: fix bug in updating nursery pointers · 31d38067
      Simon Marlow authored
      Summary:
      We were unconditionally updating the nursery pointers to be
      `nurseries[cap->no]`, but when using nursery chunks this might be
      wrong. This manifested as a later assertion failure in allocate().
      
      Test Plan: new test case
      
      Reviewers: bgamari, niteria, erikd
      
      Subscribers: thomie, carter
      
      Differential Revision: https://phabricator.haskell.org/D4649
      
      (cherry picked from commit 4cb5595e)
      31d38067
    • Herbert Valerio Riedel's avatar
      Emit info-level log message when package envs are loaded · de3ade60
      Herbert Valerio Riedel authored and Ben Gamari's avatar Ben Gamari committed
      A common complaint with the new package environment files feature is
      that it's not obvious when package environments have been picked up.
      This patch applies the same strategy that was already used for `.ghci` files
      (which exhibit similar potential for confusion, c.f. #11389) to package
      environment files.
      
      For instance, this new notification looks like below for a GHCi invocation which
      loads both, a GHCi configuration as well as a package environment:
      
        GHCi, version 8.5.20180512: http://www.haskell.org/ghc/  :? for help
        Loaded package environment from /tmp/parsec-3.1.13.0/.ghc.environment.x86_64-linux-8.5.20180512
        Loaded GHCi configuration from /home/hvr/.ghci
        Prelude>
      
      Addresses #15145
      
      Reviewed By: bgamari, angerman
      
      GHC Trac Issues: #15145
      
      Differential Revision: https://phabricator.haskell.org/D4689
      
      (cherry picked from commit 00049e2d)
      de3ade60
    • Bertram Felgenhauer's avatar
      Compute DW_FORM_block length correctly; also fixes #15068 · 56812d6f
      Bertram Felgenhauer authored and Ben Gamari's avatar Ben Gamari committed
      Before this patch, the pprUnwindwExpr function computed the length of
      by the following assembly fragment:
      
      	.uleb128 1f-.-1
      	<expression data>
      1:
      
      That is, to compute the length, it takes the difference of the label 1
      and the address of the .uleb128 directive, and subtracts 1.
      
      In #15068 it was reported that `as` from binutils 4.30 has trouble with
      evaluating the `.` part of the expression. However, there is actually a
      problem with the expression, if the length of the data ever becomes
      larger than 128: In that case, the .uleb128 directive will emit more
      than 1 byte, and the computed length will be wrong.
      
      The present patch changes the assembly fragment to use two labels,
      which fixes both these problems.
      
      	.uleb128 2f-1f
      1:
      	<expression data>
      2:
      
      Test Plan: validate
      
      Reviewers: bgamari, osa1
      
      Reviewed By: bgamari
      
      Subscribers: thomie, carter
      
      GHC Trac Issues: #15068
      
      Differential Revision: https://phabricator.haskell.org/D4654
      
      (cherry picked from commit 358b5080)
      56812d6f
    • Sergei Trofimovich's avatar
      rts: export new absentSumFieldError from base · e4e61f77
      Sergei Trofimovich authored and Ben Gamari's avatar Ben Gamari committed
      
      commit b2ff5dde "Fix #15038"
      added new stable closure 'absentSumFieldError_closure' to
      base package. This closure is used in rts package.
      
      Unfortunately the symbol was not explicitly exported and build
      failed on windows as:
      
      ```
      "inplace/bin/ghc-stage1" -o ...hsc2hs.exe ...
      rts/dist/build/libHSrts.a(RtsStartup.o): In function `hs_init_ghc':
      
      rts/RtsStartup.c:272:0: error:
           undefined reference to `base_ControlziExceptionziBase_absentSumFieldError_closure'
          |
      272 |     getStablePtr((StgPtr)absentSumFieldError_closure);
          | ^
      
      ```
      
      This change adds 'absentSumFieldError_closure' to explicit export
      into libHSbase.def.
      
      Signed-off-by: default avatarSergei Trofimovich <slyfox@gentoo.org>
      (cherry picked from commit 79bbb23f)
      e4e61f77
    • Ömer Sinan Ağacan's avatar
      Fix #15038 · 64ecfc37
      Ömer Sinan Ağacan authored
      We introduce a new Id for unused pointer values in unboxed sums that is
      not CAFFY. Because the Id is not CAFFY it doesn't make non-CAFFY
      definitions CAFFY, fixing #15038.
      
      To make sure anything referenced by the new id will be retained we get a
      stable pointer to in on RTS startup.
      
      Test Plan: Passes validate
      
      Reviewers: simonmar, simonpj, hvr, bgamari, erikd
      
      Reviewed By: simonmar
      
      Subscribers: rwbarton, thomie, carter
      
      GHC Trac Issues: #15038
      
      Differential Revision: https://phabricator.haskell.org/D4680
      
      (cherry picked from commit b2ff5dde)
      64ecfc37
    • Ben Gamari's avatar
      rts: Fix compaction of SmallMutArrPtrs · 0d40fd75
      Ben Gamari authored and Ben Gamari's avatar Ben Gamari committed
      This was blatantly wrong due to copy-paste blindness:
      
       * labels were shadowed, which GHC doesn't warn about(!), resulting in
         plainly wrong behavior
       * the sharing check was omitted
       * the wrong closure layout was being used
      
      Moreover, the test wasn't being run due to its primitive dependency, so
      I didn't even notice. Sillyness.
      
      Test Plan: install `primitive`, `make test TEST=compact_small_array`
      
      Reviewers: simonmar, erikd
      
      Reviewed By: simonmar
      
      Subscribers: rwbarton, thomie, carter
      
      GHC Trac Issues: #13857.
      
      Differential Revision: https://phabricator.haskell.org/D4702
      
      (cherry picked from commit 12deb9a9)
      0d40fd75
  9. May 13, 2018
  10. May 02, 2018
  11. Apr 20, 2018
  12. Apr 19, 2018
  13. Apr 17, 2018
  14. Apr 16, 2018
  15. Apr 14, 2018
    • Simon Peyton Jones's avatar
      SpecConstr: accommodate casts in value arguments · 6ed694d7
      Simon Peyton Jones authored
      This commit:
      
        commit fb050a33
        Author: Simon Peyton Jones <simonpj@microsoft.com>
        Date:   Thu Oct 12 11:00:19 2017 +0100
      
        Do not bind coercion variables in SpecConstr rules
      
      arranged to reject any SpecConstr call pattern that mentioned
      a coercion in the pattern.
      
      There was a good reason for that
      -- see Note [SpecConstr and casts] --
      but I didn't realise how important it was to accept patterns
      that mention casts in /terms/.  Trac #14936 showed this up.
      
      This patch just narrows the restriction to discard only
      the cases where the coercion is mentioned only in types.
      Fortunately that was pretty easy to do.
      
      (cherry picked from commit 5ab8094e)
      6ed694d7
    • Joachim Breitner's avatar
      In Exitify, zap idInfo of abstracted variables (fixes #15005) · 2f5b97c3
      Joachim Breitner authored and Ben Gamari's avatar Ben Gamari committed
      as helpfully outlined by SPJ.
      
      This commit copies a small bit code from `SetLevels` which could
      reasonably be put in `Id` as `zapAllIdinfo`; I did not do this to make
      merging this commmit into `ghc-8.4` easier.
      
      If this commit gets merged, then presumably after commit
      3f59d380 (test case) and
      ae0cff0a (other fixes to Exitify.hs).
      
      Differential Revision: https://phabricator.haskell.org/D4582
      
      (cherry picked from commit 3cfb12d8)
      2f5b97c3
    • Joachim Breitner's avatar
      Add test case for #15005 · e1071f6e
      Joachim Breitner authored and Ben Gamari's avatar Ben Gamari committed
      this succeeds on `master` right now, but I confirmed that it fails on
      ghc-8.4.1-release.
      
      (cherry picked from commit 3f59d380)
      e1071f6e
    • Joachim Breitner's avatar
      CSE: Walk past join point lambdas (#15002) · 4edcef78
      Joachim Breitner authored and Ben Gamari's avatar Ben Gamari committed
      As the CSE transformation traverses the syntax tree, it needs to go past
      the lambdas of a join point, and only look for CSE opportunities inside,
      as a join point’s lambdas must be preserved. Simple fix; comes with a
      Note and a test case.
      
      Thanks to Ryan Scott for an excellently minimized test case, and for
      bisecting GHC.
      
      Differential Revision: https://phabricator.haskell.org/D4572
      
      (cherry picked from commit ae0cff0a)
      4edcef78
    • Ryan Scott's avatar
      Correct FixIOException's @since annotation retroactively · 8147fa32
      Ryan Scott authored
      Summary:
      In D4113, a `FixIOException` data type was added with a
      `@since TODO` annotation, but it seems that `TODO` made it out into
      `base-4.11` itself. I've (retroactively) fixed this and added an
      entry to the `base-4.11` entry in the `changelog`.
      
      Test Plan: Read it
      
      Reviewers: dfeuer, hvr, bgamari
      
      Reviewed By: dfeuer
      
      Subscribers: thomie, carter
      
      GHC Trac Issues: #14356, #15025
      
      Differential Revision: https://phabricator.haskell.org/D4578
      
      (cherry picked from commit ce27c7d5)
      8147fa32
  16. Apr 13, 2018
Loading