1. 16 Mar, 2019 4 commits
    • Ben Gamari's avatar
    • Ben Gamari's avatar
      compiler: Disable atomic renaming on Windows · 1c1b63d6
      Ben Gamari authored
      As discussed in #16450, this feature regresses CI on Windows, causing
      non-deterministic failures due to missing files.
    • Simon Peyton Jones's avatar
      Add location to the extra-constraints wildcard · 600a1ac3
      Simon Peyton Jones authored
      The extra-constraints wildcard had lost its location
      (issue #16431).
      Happily this is easy to fix.  Lots of error improvements.
    • Simon Peyton Jones's avatar
      Improve error recovery in the typechecker · 4927117c
      Simon Peyton Jones authored
      Issue #16418 showed that we were carrying on too eagerly after a bogus
      type signature was identified (a bad telescope in fact), leading to a
      subsequent crash.
      This led me in to a maze of twisty little passages in the typechecker's
      error recovery, and I ended up doing some refactoring in TcRnMonad.
      Some specfifics
      * TcRnMonad.try_m is now called attemptM.
      * I switched the order of the result pair in tryTc,
        to make it consistent with other similar functions.
      * The actual exception used in the Tc monad is irrelevant so,
        to avoid polluting type signatures, I made tcTryM, a simple
        wrapper around tryM, and used it.
      The more important changes are in
      * TcSimplify.captureTopConstraints, where we should have been calling
        simplifyTop rather than reportUnsolved, so that levity defaulting
        takes place properly.
      * TcUnify.emitResidualTvConstraint, where we need to set the correct
        status for a new implication constraint.  (Previously we ended up
        with an Insoluble constraint wrapped in an Unsolved implication,
        which meant that insolubleWC gave the wrong answer.
  2. 15 Mar, 2019 8 commits
    • Simon Peyton Jones's avatar
      Add flavours link · 57201beb
      Simon Peyton Jones authored
    • Peter Trommler's avatar
      PPC NCG: Use liveness information in CmmCall · 83e09d3c
      Peter Trommler authored
      We make liveness information for global registers
      available on `JMP` and `BCTR`, which were the last instructions
      missing. With complete liveness information we do not need to
      reserve global registers in `freeReg` anymore. Moreover we
      assign R9 and R10 to callee saves registers.
      Cleanup by removing `Reg_Su`, which was unused, from `freeReg`
      and removing unused register definitions.
      The calculation of the number of floating point registers is too
      conservative. Just follow X86 and specify the constants directly.
      Overall on PowerPC this results in 0.3 % smaller code size in nofib
      while runtime is slightly better in some tests.
    • Simon Peyton Jones's avatar
      Report better suggestion for GADT data constructor · 97032ed9
      Simon Peyton Jones authored
      This addresses issue #16427. An easy fix.
    • Ryan Scott's avatar
      Update Trac ticket URLs to point to GitLab · 610ec224
      Ryan Scott authored
      This moves all URL references to Trac tickets to their corresponding
      GitLab counterparts.
    • David Eichmann's avatar
    • David Eichmann's avatar
      Hadrian: remove unneeded rpaths. · 4df75772
      David Eichmann authored
      Issue #12770
    • David Eichmann's avatar
      Hadrian: remove unneeded imports. · d10e2368
      David Eichmann authored
    • Ryan Scott's avatar
      Remove the GHCi debugger's panicking isUnliftedType check · 8162eab2
      Ryan Scott authored
      The GHCi debugger has never been that robust in the face of
      higher-rank types, or even types that are _interally_ higher-rank,
      such as the types of many class methods (e.g., `fmap`). In GHC 8.2,
      however, things became even worse, as the debugger would start to
      _panic_ when a user tries passing the name of a higher-rank thing
      to `:print`. This all ties back to a strange `isUnliftedType` check
      in `Debugger` that was mysteriously added 11 years ago
      (in commit 4d71f5ee) with no
      explanation whatsoever.
      After some experimentation, no one is quite sure what this
      `isUnliftedType` check is actually accomplishing. The test suite
      still passes if it's removed, and I am unable to observe any
      differences in debugger before even with data types that _do_ have
      fields of unlifted types (e.g., `data T = MkT Int#`). Given that
      this is actively causing problems (see #14828), the prudent thing
      to do seems to be just removing this `isUnliftedType` check, and
      waiting to see if anyone shouts about it. This patch accomplishes
      just that.
      Note that this patch fix the underlying issues behind #14828, as the
      debugger will still print unhelpful info if you try this:
      λ> f :: (forall a. a -> a) -> b -> b; f g x = g x
      λ> :print f
      f = (_t1::t1)
      But fixing this will require much more work, so let's start with the
      simple stuff for now.
  3. 14 Mar, 2019 1 commit
  4. 13 Mar, 2019 3 commits
  5. 12 Mar, 2019 13 commits
  6. 11 Mar, 2019 3 commits
  7. 09 Mar, 2019 8 commits
    • Ben Gamari's avatar
      Drop utils/count_lines · 0cd98957
      Ben Gamari authored
      This doesn't appear to be used anywhere in the build system and it
      relies on perl. Drop it.
    • Ben Gamari's avatar
      Rip out perl dependency · b760269c
      Ben Gamari authored
      The object splitter was the last major user of perl. There remain a few
      uses in nofib but we can just rely on the system's perl for this since
      it's not critical to the build.
    • Sylvain Henry's avatar
      NCG: correctly escape path strings on Windows (#16389) · 6b2f0991
      Sylvain Henry authored
      GHC native code generator generates .incbin and .file directives. We
      need to escape those strings correctly on Windows (see #16389).
    • Edward Z. Yang's avatar
      Make bkpcabal01 test compatible with new ordering requirements. · 6e3e537e
      Edward Z. Yang authored
      Previously, our test did something like this:
      1. Typecheck p
      2. Typecheck q (which made use of an instantiated p)
      3. Build instantiated p
      4. Build instantiated q
      Cabal previously permitted this, under the reasoning that during
      typechecking there's no harm in using the instantiated p even if we
      haven't build it yet; we'll just instantiate it on the fly with p.
      However, this is not true!  If q makes use of a Template Haskell
      splice from p, we absolutely must have built the instantiated p
      before we typecheck q, since this typechecking will need to
      run some splices.  Cabal now complains that you haven't done
      it correctly, which we indeed have not!
      Reordering so that we do this:
      1. Typecheck p
      3. Build instantiated p
      2. Typecheck q (which made use of an instantiated p)
      4. Build instantiated q
      Fixes the problem.  If Cabal had managed the ordering itself, it would
      have gotten it right.
      Signed-off-by: Edward Z. Yang's avatarEdward Z. Yang <ezyang@fb.com>
    • Ben Gamari's avatar
      rts: Factor out large bitmap walking · e76ee675
      Ben Gamari authored
      This will be needed by the mark phase of the non-moving collector
      so let's factor it out.
    • Niklas Hambüchen's avatar
    • Niklas Hambüchen's avatar
      compiler: Write .o files atomically. See #14533 · cfbedf17
      Niklas Hambüchen authored
      This issue was reproduced with, and the fix confirmed with,
      the `hatrace` tool for syscall-based fault injection:
      The concrete test case for GHC is at
      A previous, nondeterministic reproducer for the issue was provided by
      Alexey Kuleshevich in
      Signed-off-by: default avatarNiklas Hambüchen <niklas@fpcomplete.com>
      Reviewed-by: default avatarAlexey Kuleshevich <alexey@fpcomplete.com>
    • Simon Peyton Jones's avatar
      Stop inferring over-polymorphic kinds · 1f5cc9dc
      Simon Peyton Jones authored
      Before this patch GHC was trying to be too clever
      (Trac #16344); it succeeded in kind-checking this
      polymorphic-recursive declaration
          data T ka (a::ka) b
            = MkT (T Type           Int   Bool)
                  (T (Type -> Type) Maybe Bool)
      As Note [No polymorphic recursion] discusses, the "solution" was
      horribly fragile.  So this patch deletes the key lines in
      TcHsType, and a wodge of supporting stuff in the renamer.
      There were two regressions, both the same: a closed type family
      decl like this (T12785b) does not have a CUSK:
        type family Payload (n :: Peano) (s :: HTree n x) where
          Payload Z (Point a) = a
          Payload (S n) (a `Branch` stru) = a
      To kind-check the equations we need a dependent kind for
      Payload, and we don't get that any more.  Solution: make it
      a CUSK by giving the result kind -- probably a good thing anyway.
      The other case (T12442) was very similar: a close type family
      declaration without a CUSK.