1. 07 Jun, 2019 10 commits
    • Moritz Angermann's avatar
      llvm-targets: Add x86_64 android layout · e87b9f87
      Moritz Angermann authored
      e87b9f87
    • Simon Jakobi's avatar
      Fix isValidNatural: The BigNat in NatJ# must have at least 2 limbs · be63d299
      Simon Jakobi authored
      Previously the `integer-gmp` variant of `isValidNatural` would fail to
      detect values `<= maxBound::Word` that were incorrectly encoded using
      the `NatJ#` constructor.
      be63d299
    • Ben Gamari's avatar
      Hadrian: Delete target symlink in createFileLinkUntracked · 9bb58799
      Ben Gamari authored
      Previously createFileLinkUntracked would fail if the symlink already
      existed.
      9bb58799
    • Simon Peyton Jones's avatar
      Preserve ShadowInfo when rewriting evidence · da26ffe7
      Simon Peyton Jones authored
      When the canonicaliser rewrites evidence of a Wanted, it
      should preserve the ShadowInfo (ctev_nosh) field.  That is,
      a WDerive should rewrite to WDerive, and WOnly to WOnly.
      
      Previously we were unconditionally making a WDeriv, thereby
      rewriting WOnly to WDeriv.  This bit Nick Frisby (issue #16735)
      in the context of his plugin, but we don't have a compact test
      case.
      
      The fix is simple, but does involve a bit more plumbing,
      to pass the old ShadowInfo around, to use when building
      the new Wanted.
      da26ffe7
    • John Ericson's avatar
      Factor out 'getLibDir' / 'getBaseDir' into a new GHC.BaseDir ghc-boot module · 387050d0
      John Ericson authored
      ghc-pkg and ghc already both needed this. I figure it is better to
      deduplicate, especially seeing that changes to one (FreeBSD CPP) didn't
      make it to the other.
      
      Additionally in !1090 I make ghc-pkg look up the settings file, which
      makes it use the top dir a bit more widely. If that lands, any
      difference in the way they find the top dir would be more noticable.
      
      That change also means sharing more code between ghc and ghc-package
      (namely the settings file parsing code), so I'd think it better to get
      off the slipperly slope of duplicating code now.
      387050d0
    • Roland Senn's avatar
      Fix #16700: Tiny errors in output of GHCi commands :forward and :info · d1dc0ed7
      Roland Senn authored
      `:info Coercible` now outputs the correct section number of the GHCi User's guide together with the secion title.
      
      `:forward x` gives the correct syntax hint.
      d1dc0ed7
    • Matthew Pickering's avatar
      Add HEAP_PROF_SAMPLE_END event to mark end of samples · 0b7372f6
      Matthew Pickering authored
      This allows a user to observe how long a sampling period lasts so that
      the time taken can be removed from the profiling output.
      
      Fixes #16697
      0b7372f6
    • Sebastian Graf's avatar
      TmOracle: Replace negative term equalities by refutable PmAltCons · e963beb5
      Sebastian Graf authored
      The `PmExprEq` business was a huge hack and was at the same time vastly
      too powerful and not powerful enough to encode negative term equalities,
      i.e. facts of the form "forall y. x ≁ Just y".
      
      This patch introduces the concept of 'refutable shapes': What matters
      for the pattern match checker is being able to encode knowledge of the
      kind "x can no longer be the literal 5". We encode this knowledge in a
      `PmRefutEnv`, mapping a set of newly introduced `PmAltCon`s (which are
      just `PmLit`s at the moment) to each variable denoting above
      inequalities.
      
      So, say we have `x ≁ 42 ∈ refuts` in the term oracle context and
      try to solve an equality like `x ~ 42`. The entry in the refutable
      environment will immediately lead to a contradiction.
      
      This machinery renders the whole `PmExprEq` and `ComplexEq` business
      unnecessary, getting rid of a lot of (mostly dead) code.
      
      See the Note [Refutable shapes] in TmOracle for a place to start.
      
      Metric Decrease:
          T11195
      e963beb5
    • Andrew Martin's avatar
      [skip ci] Improve the documentation of the CNF primops. In this context, the... · d3915b30
      Andrew Martin authored
      [skip ci] Improve the documentation of the CNF primops. In this context, the term "size" is ambiguous and is now avoided. Additionally, the distinction between a CNF and the blocks that comprise it has been emphasize. The vocabulary has been made more consistent with the vocabulary in the C source for CNF.
      d3915b30
    • Matthew Pickering's avatar
      gitlab-ci: Disable darwin hadrian job · 567894b4
      Matthew Pickering authored
      See #16771
      
      We don't have enough capacity for the two jobs currently.
      
      [skip ci]
      567894b4
  2. 04 Jun, 2019 7 commits
  3. 03 Jun, 2019 4 commits
    • Ben Gamari's avatar
      799b1d26
    • Takenobu Tani's avatar
      Add `-haddock` to prepare-system.sh and .gitlab-ci.yml · c4f94320
      Takenobu Tani authored
      To cover ci conditions from ghc8.6 to 8.9, I add `-haddock` option
      to `.circleci/prepare-system.sh` and .gitlab-ci.yml.
      after including `mk/flavours/*`.
      c4f94320
    • Takenobu Tani's avatar
      Add `-haddock` to perf.mk rather than prepare-system.sh · 43a39c3c
      Takenobu Tani authored
      To cover ci conditions from ghc8.6 to 8.9, I add `-haddock` option
      to `mk/flavours/perf.mk` rather than `.circleci/prepare-system.sh`.
      
      Because in windows condition of ghc-8.9, `mk/flavours/*` is included
      after `prepare-system.sh`.
      
      In addition, in linux condition of ghc-8.6, `mk/flavors/perf.mk` is used.
      43a39c3c
    • Takenobu Tani's avatar
      Add `-haddock` option under ci condition to fix #16415 · 33e37d06
      Takenobu Tani authored
      In order to use the `:doc` command in ghci, it is necessary
      to compile for core libraries with `-haddock` option.
      
      Especially, the `-haddock` option is essential for release building.
      
      Note:
        * The `-haddock` option may affect compile time and binary size.
        * But hadrian has already set `-haddock` as the default.
        * This patch affects the make-based building.
      
      This patch has been split from !532.
      33e37d06
  4. 01 Jun, 2019 5 commits
    • Ömer Sinan Ağacan's avatar
      rts: Remove unused decls from CNF.h · 2e297b36
      Ömer Sinan Ağacan authored
      2e297b36
    • Ömer Sinan Ağacan's avatar
      Fix rewriting invalid shifts to errors · 1503da32
      Ömer Sinan Ağacan authored
      Fixes #16449.
      
      5341edf3 removed a code in rewrite rules for bit shifts, which broke the
      "silly shift guard", causing generating invalid bit shifts or heap
      overflow in compile time while trying to evaluate those invalid bit
      shifts.
      
      The "guard" is explained in Note [Guarding against silly shifts] in
      PrelRules.hs.
      
      More specifically, this was the breaking change:
      
          --- a/compiler/prelude/PrelRules.hs
          +++ b/compiler/prelude/PrelRules.hs
          @@ -474,12 +474,11 @@ shiftRule shift_op
                  ; case e1 of
                      _ | shift_len == 0
                        -> return e1
          -             | shift_len < 0 || wordSizeInBits dflags < shift_len
          -             -> return (mkRuntimeErrorApp rUNTIME_ERROR_ID wordPrimTy
          -                                        ("Bad shift length" ++ show shift_len))
      
      This patch reverts this change.
      
      Two new tests added:
      
      - T16449_1: The original reproducer in #16449. This was previously
        casing a heap overflow in compile time when CmmOpt tries to evaluate
        the large (invalid) bit shift in compile time, using `Integer` as the
        result type. Now it builds as expected. We now generate an error for
        the shift as expected.
      
      - T16449_2: Tests code generator for large (invalid) bit shifts.
      1503da32
    • Ryan Scott's avatar
      Fix space leaks in dynLoadObjs (#16708) · 76e58890
      Ryan Scott authored
      When running the test suite on a GHC built with the `quick` build
      flavour, `-fghci-leak-check` noticed some space leaks. Careful
      investigation led to `Linker.dynLoadObjs` being the culprit.
      Pattern-matching on `PeristentLinkerState` and a dash of `$!` were
      sufficient to fix the issue. (ht to mpickering for his suggestions,
      which were crucial to discovering a fix)
      
      Fixes #16708.
      76e58890
    • Ryan Scott's avatar
      Reject nested foralls in foreign imports (#16702) · 45f88494
      Ryan Scott authored
      This replaces a panic observed in #16702 with a simple error message
      stating that nested `forall`s simply aren't allowed in the type
      signature of a `foreign import` (at least, not at present).
      
      Fixes #16702.
      45f88494
    • Nathan Collins's avatar
      Improve ThreadId Show instance · 1d43d4a3
      Nathan Collins authored
      By making it include parens when a derived instance would. For example, this changes the (hypothetical) code `show (Just (ThreadId 3))` to produce `"Just (ThreadId 3)"` instead of the current `"Just ThreadId 3"`.
      1d43d4a3
  5. 31 May, 2019 13 commits
  6. 30 May, 2019 1 commit