1. 05 Sep, 2020 3 commits
  2. 04 Sep, 2020 4 commits
    • Ryan Scott's avatar
      Introduce isBoxedTupleDataCon and use it to fix #18644 · c1e54439
      Ryan Scott authored
      The code that converts promoted tuple data constructors to
      `IfaceType`s in `GHC.CoreToIface` was using `isTupleDataCon`, which
      conflates boxed and unboxed tuple data constructors. To avoid this,
      this patch introduces `isBoxedTupleDataCon`, which is like
      `isTupleDataCon` but only works for _boxed_ tuple data constructors.
      While I was in town, I was horribly confused by the fact that there
      were separate functions named `isUnboxedTupleCon` and
      `isUnboxedTupleTyCon` (similarly, `isUnboxedSumCon` and
      `isUnboxedSumTyCon`). It turns out that the former only works for
      data constructors, despite its very general name! I opted to rename
      `isUnboxedTupleCon` to `isUnboxedTupleDataCon` (similarly, I renamed
      `isUnboxedSumCon` to `isUnboxedSumDataCon`) to avoid this potential
      confusion, as well as to be more consistent with
      the naming convention I used for `isBoxedTupleDataCon`.
      Fixes #18644.
    • Sylvain Henry's avatar
    • Sylvain Henry's avatar
      DynFlags: use Platform in foldRegs* · 89ce7cdf
      Sylvain Henry authored
    • Sylvain Henry's avatar
      Don't rely on CLabel's Outputable instance in CmmToC · 1d6d6488
      Sylvain Henry authored
      This is in preparation of the removal of sdocWithDynFlags (#10143),
      hence of the refactoring of CLabel's Outputable instance.
  3. 03 Sep, 2020 2 commits
  4. 02 Sep, 2020 4 commits
  5. 01 Sep, 2020 18 commits
  6. 28 Aug, 2020 3 commits
  7. 27 Aug, 2020 2 commits
  8. 26 Aug, 2020 4 commits
    • Krzysztof Gogolewski's avatar
      primops: Remove Monadic and Dyadic categories · 770100e0
      Krzysztof Gogolewski authored
      There were four categories of primops: Monadic, Dyadic, Compare, GenPrimOp.
      The compiler does not treat Monadic and Dyadic in any special way,
      we can just replace them with GenPrimOp.
      Compare is still used in isComparisonPrimOp.
    • Peter Trommler's avatar
      PPC and X86: Portable printing of IEEE floats · fcb10b6c
      Peter Trommler authored
      GNU as and the AIX assembler support floating point literals.
      SPARC seems to have support too but I cannot test on SPARC.
      Curiously, `doubleToBytes` is also used in the LLVM backend.
      To avoid endianness issues when cross-compiling float and double literals
      are printed as C-style floating point values. The assembler then takes
      care of memory layout and endianness.
      This was brought up in #18431 by @hsyl20.
    • Sylvain Henry's avatar
      Bignum: fix BigNat subtraction (#18604) · dc476a50
      Sylvain Henry authored
      There was a confusion between the boolean expected by
      withNewWordArrayTrimedMaybe and the boolean returned by subtracting
    • Sylvain Henry's avatar
      Refactor UnitId pretty-printing · 0b17fa18
      Sylvain Henry authored
      When we pretty-print a UnitId for the user, we try to map it back to its
      origin package name, version and component to print
      "package-version:component" instead of some hash.
      The UnitId type doesn't carry these information, so we have to look into
      a UnitState to find them. This is why the Outputable instance of
      UnitId used `sdocWithDynFlags` in order to access the `unitState` field
      of DynFlags.
      This is wrong for several reasons:
      1. The DynFlags are accessed when the message is printed, not when it is
         generated. So we could imagine that the unitState may have changed
         in-between. Especially if we want to allow unit unloading.
      2. We want GHC to support several independent sessions at once, hence
         several UnitState. The current approach supposes there is a unique
         UnitState as a UnitId doesn't indicate which UnitState to use.
      See the Note [Pretty-printing UnitId] in GHC.Unit for the new approach
      implemented by this patch.
      One step closer to remove `sdocDynFlags` field from `SDocContext`
      Fix #18124.
      Also fix some Backpack code to use SDoc instead of String.