Skip to content
Snippets Groups Projects
  1. Jul 29, 2021
  2. Jul 28, 2021
    • Alfredo Di Napoli's avatar
      Port more DriverUnknownMessage into richer DriverMessage constructors · 4a2ef3dd
      Alfredo Di Napoli authored and Marge Bot's avatar Marge Bot committed
      In order:
      
      * Introduce the `PsErrUnknownOptionsPragma` diagnostic message
      
        This commit changes the diagnostic emitted inside
        `GHC.Parser.Header.checkProcessArgsResult` from an (erroneous) and
        unstructured `DriverUnknownMessage` to a `PsErrUnknownOPtionsPragma`,
        i.e. a new data constructor of a `PsHeaderMessage`.
      
      * Add the `DriverUserDefinedRuleIgnored` diagnostic message
      
      * Add `DriverUserDefinedRuleIgnored` data constructor
      
        This commit adds (and use) a new data constructor to the `DriverMessage`
        type, replacing a `DriverUnknownMessage` with it.
      
      * Add and use `DriverCannotLoadInterfaceFile` constructor
      
        This commit introduces the DriverCannotLoadInterfaceFile constructor for
        the `DriverMessage` type and it uses it to replace and occurrence of
        `DriverUnknownMessage`.
      
      * Add and use the `DriverInferredSafeImport` constructor
      
        This commit adds a new `DriverInferredSafeImport` constructor to the
        `DriverMessage` type, and uses it in `GHC.Driver.Main` to replace one
        occurrence of `DriverUnknownMessage`.
      
      * Add and use `DriverCannotImportUnsafeModule` constructor
      
        This commit adds the `DriverCannotImportUnsafeModule` constructor
        to the `DriverMessage` type, and later using it to replace one usage of
        `DriverUnknownMessage` in the `GHC.Driver.Main` module.
      
      * Add and use `DriverMissingSafeHaskellMode` constructor
      
      * Add and use `DriverPackageNotTrusted` constructor
      
      * Introduce and use `DriverInferredSafeModule` constructor
      
      * Add and use `DriverMarkedTrustworthyButInferredSafe` constructor
      
      * Add and use `DriverCannotImportFromUntrustedPackage`
      4a2ef3dd
    • CarrieMY's avatar
      Update expected stderr for affected tests, which are not under Tc directory · 3382b3d6
      CarrieMY authored and Marge Bot's avatar Marge Bot committed
      3382b3d6
    • CarrieMY's avatar
      Fix type check error message grammar (fixes #20122) · 7dc0dc99
      CarrieMY authored and Marge Bot's avatar Marge Bot committed
      Remove trailing spaces
      7dc0dc99
    • Simon Peyton Jones's avatar
      Fix a subtle scoping error in simplLazyBind · 91eb1857
      Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
      In the call to prepareBinding (in simplLazyBind), I had failed to
      extend the in-scope set with the binders from body_floats1. As as
      result, when eta-expanding deep inside prepareBinding we made up
      an eta-binder that shadowed a variable free in body1.  Yikes.
      
      It's hard to trigger this bug.  It showed up when I was working
      on !5658, and I started using the in-scope set for eta-expansion,
      rather than taking free variables afresh.  But even then it only
      showed up when compiling a module in Haddock
         utils/haddock/haddock-api/src/Haddock/Interface/Rename.hs
      
      Sadly Haddock is compiled without Core Lint, so we ultimately got
      a seg-fault.  Lint nailed it fast once I realised that it was off.
      
      There is some other tiny refactoring in this patch.
      91eb1857
    • Simon Peyton Jones's avatar
      Improve performance of eta expansion · 299b7436
      Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
      Eta expansion was taking ages on T18223.  This patch
      
      * Aggressively squash reflexive casts in etaInfoApp.
        See Note [Check for reflexive casts in eta expansion]
        These changes decreased compile-time allocation by 80%!
      
      * Passes the Simplifier's in-scope set to etaExpandAT, so we
        don't need to recompute it.  (This alone saved 10% of compile
        time.)
      
        Annoyingly several functions in the Simplifier (namely
        makeTrivialBinding and friends) need to get SimplEnv, rather
        than SimplMode, but that is no big deal.
      
      Lots of small changes in compile-time allocation, less than 1%
      and in both directions.  A couple of bigger changes, including
      the rather delicate T18223
      
      T12425(optasm) ghc/alloc    98448216.0    97121224.0  -1.3% GOOD
      T18223(normal) ghc/alloc  5454689676.0  1138238008.0 -79.1% GOOD
      
      Metric Decrease:
          T12425
          T18223
      299b7436
    • Simon Peyton Jones's avatar
      Simplify and improve the eta expansion mechanism · a199d653
      Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
      Previously the eta-expansion would return lambdas interspersed with
      casts; now the cast is just pushed to the outside: #20153.
      
      This actually simplifies the code.
      
      I also improved mkNthCo to account for SymCo, so that
         mkNthCo n (SymCo (TyConAppCo tc cos))
      would work well.
      a199d653
    • Simon Peyton Jones's avatar
      Inline less logging code · 2567d13b
      Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
      When eyeballing calls of GHC.Core.Opt.Simplify.Monad.traceSmpl,
      I saw that lots of cold-path logging code was getting inlined
      into the main Simplifier module.
      
      So in GHC.Utils.Logger I added a NOINLINE on logDumpFile'.
      
      For logging, the "hot" path, up to and including the conditional,
      should be inlined, but after that we should inline as little as
      possible, to reduce code size in the caller.
      2567d13b
    • Simon Peyton Jones's avatar
      Make the occurrence analyser a bit stricter · 05f54bb4
      Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
      occAnalArgs and occAnalApp are very heavily used functions, so it pays
      to make them rather strict: fewer thunks constructed.  All these
      thunks are ultimately evaluated anyway.
      
      This patch gives a welcome reduction compile time allocation of around
      0.5% across the board. For T9961 it's a 2.2% reduction.
      
      Metric Decrease:
          T9961
      05f54bb4
    • Simon Peyton Jones's avatar
      White space, spelling, and a tiny refactor · a67e6814
      Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
      No change in behaviour
      a67e6814
    • Simon Peyton Jones's avatar
      Extend the in-scope set to silence substExpr warnings · 25ca0b5a
      Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
      substExpr warns if it finds a LocalId that isn't in the in-scope set.
      This patch extends the in-scope set to silence the warnings.  (It has
      no effect on behaviour.)
      25ca0b5a
    • Simon Peyton Jones's avatar
      Improve postInlineUnconditionally · 9dbab4fd
      Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
      See Note [Use occ-anald RHS in postInlineUnconditionally].
      This explains how to eliminate an extra round of simplification,
      which can happen if postInlineUnconditionally uses a RHS
      that is no occurrence-analysed.
      
      This opportunity has been there for ages; I discovered it
      when looking at a compile-time perf regression that happened
      because the opportunity wasn't exploited.
      9dbab4fd
    • Simon Peyton Jones's avatar
      Print out module name in "bailing out" message · 4e4ca28c
      Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
      4e4ca28c
    • Simon Peyton Jones's avatar
      Fix smallEnoughToInline · d43a9029
      Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
      I noticed that smallEnoughToInline said "no" to UnfWhen guidance,
      which seems quite wrong -- those functions are particularly small.
      d43a9029
    • Krzysztof Gogolewski's avatar
      Functor docs: link to free theorem explanation (#19300) · a57e4a97
      Krzysztof Gogolewski authored and Marge Bot's avatar Marge Bot committed
      a57e4a97
    • Krzysztof Gogolewski's avatar
      Improve docs of bang patterns (#19068) · 2625d48e
      Krzysztof Gogolewski authored and Marge Bot's avatar Marge Bot committed
      2625d48e
    • Krzysztof Gogolewski's avatar
      Document DerivingVia unsafety (#19786) · dabe6113
      Krzysztof Gogolewski authored and Marge Bot's avatar Marge Bot committed
      dabe6113
    • Krzysztof Gogolewski's avatar
      Docs: use :default: and :ghc-ticket: · f3256769
      Krzysztof Gogolewski authored and Marge Bot's avatar Marge Bot committed
      f3256769
    • Ben Gamari's avatar
      rts: Don't rely on configuration when CLEANING=YES · 10678945
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      The make build system doesn't source config.mk when CLEANING=YES,
      consequently we previously failed to identify an appropriate
      adjustor implementation to use during cleaning.
      
      Fixes #20166.
      10678945
    • Sylvain Henry's avatar
      Hadrian: disable profiled RTS with no_profiled_libs flavour transformer · 323473e8
      Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
      Hadrian uses the RTS ways to determine which iserv programs to embed
      into bindist. But profiled iserv program (and any other code) can't be
      built without profiling libs and Hadrian fails. So we disable the
      profiling RTS way with the no_profiled_libs flavour transformer.
      323473e8
    • Sylvain Henry's avatar
      PIC: test for cross-module references · cddafcf6
      Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
      cddafcf6
    • Krzysztof Gogolewski's avatar
      Don't abort on representation polymorphism check · 9da20e3d
      Krzysztof Gogolewski authored and Marge Bot's avatar Marge Bot committed
      This is reverting a change introduced in linear types commit 40fa237e.
      Previously, we had to abort early, but thanks to later changes,
      this is no longer needed.
      
      There's no test, but the behavior should be better.
      The plan is to remove levity polymorphism checking in the desugarer anyway.
      9da20e3d
    • Krzysztof Gogolewski's avatar
      Add a regression test for #17697 · cab890f7
      Krzysztof Gogolewski authored and Marge Bot's avatar Marge Bot committed
      cab890f7
    • Krzysztof Gogolewski's avatar
      Remove some unused names · 97e0837d
      Krzysztof Gogolewski authored and Marge Bot's avatar Marge Bot committed
      The comment about 'parError' was obsolete.
      97e0837d
    • Krzysztof Gogolewski's avatar
      Simplify FFI code · c7c0964c
      Krzysztof Gogolewski authored and Marge Bot's avatar Marge Bot committed
      Remains of the dotnet FFI, see a7d8f437 and 1fede4bc
      c7c0964c
  3. Jul 27, 2021
Loading