1. 27 May, 2020 3 commits
    • Joshua Price's avatar
      d6203f24
    • Ben Gamari's avatar
      eventlog: Fix racy flushing · 04750304
      Ben Gamari authored
      Previously no attempt was made to avoid multiple threads writing their
      capability-local eventlog buffers to the eventlog writer simultaneously.
      This could result in multiple eventlog streams being interleaved. Fix
      this by documenting that the EventLogWriter's write() and flush()
      functions may be called reentrantly and fix the default writer to
      protect its FILE* by a mutex.
      
      Fixes #18210.
      04750304
    • Takenobu Tani's avatar
      core-spec: Modify file paths according to new module hierarchy · ede24126
      Takenobu Tani authored
      This patch updates file paths according to new module hierarchy [1]:
      
        * GHC/Core.hs                <= coreSyn/CoreSyn.hs
        * GHC/Core/Coercion.hs       <= types/Coercion.hs
        * GHC/Core/Coercion/Axiom.hs <= types/CoAxiom.hs
        * GHC/Core/Coercion/Opt.hs   <= types/OptCoercion.hs
        * GHC/Core/DataCon.hs        <= basicTypes/DataCon.hs
        * GHC/Core/FamInstEnv.hs     <= types/FamInstEnv.hs
        * GHC/Core/Lint.hs           <= coreSyn/CoreLint.hs
        * GHC/Core/Subst.hs          <= coreSyn/CoreSubst.hs
        * GHC/Core/TyCo/Rep.hs       <= types/TyCoRep.hs
        * GHC/Core/TyCon.hs          <= types/TyCon.hs
        * GHC/Core/Type.hs           <= types/Type.hs
        * GHC/Core/Unify.hs          <= types/Unify.hs
        * GHC/Types/Literal.hs       <= basicTypes/Literal.hs
        * GHC/Types/Var.hs           <= basicTypes/Var.hs
      
      [1]: https://gitlab.haskell.org/ghc/ghc/-/wikis/Make-GHC-codebase-more-modular
      
      [skip ci]
      ede24126
  2. 26 May, 2020 3 commits
    • Sylvain Henry's avatar
      Enhance Note [About units] for Backpack · cf772f19
      Sylvain Henry authored
      cf772f19
    • Sebastian Graf's avatar
      Make WorkWrap.Lib.isWorkerSmallEnough aware of the old arity · 6604906c
      Sebastian Graf authored
      We should allow a wrapper with up to 82 parameters when the original
      function had 82 parameters to begin with.
      
      I verified that this made no difference on NoFib, but then again
      it doesn't use huge records...
      
      Fixes #18122.
      6604906c
    • wz1000's avatar
      Add info about typeclass evidence to .hie files · 53814a64
      wz1000 authored
      See `testsuite/tests/hiefile/should_run/HieQueries.hs` and
      `testsuite/tests/hiefile/should_run/HieQueries.stdout` for an example of this
      
      We add two new fields, `EvidenceVarBind` and `EvidenceVarUse` to the
      `ContextInfo` associated with an Identifier. These are associated with the
      appropriate identifiers for the evidence variables collected when we come across
      `HsWrappers`, `TcEvBinds` and `IPBinds` while traversing the AST.
      
      Instance dictionary and superclass selector dictionaries from `tcg_insts` and
      classes defined in `tcg_tcs` are also recorded in the AST as originating from
      their definition span
      
      This allows us to save a complete picture of the evidence constructed by the
      constraint solver, and will let us report this to the user, enabling features
      like going to the instance definition from the invocation of a class method(or
      any other method taking a constraint) and finding all usages of a particular
      instance.
      
      Additionally,
      
      - Mark NodeInfo with an origin so we can differentiate between bindings
        origininating in the source vs those in ghc
      - Along with typeclass evidence info, also include information on Implicit
        Parameters
      - Add a few utility functions to HieUtils in order to query the new info
      
      Updates haddock submodule
      53814a64
  3. 25 May, 2020 6 commits
  4. 24 May, 2020 14 commits
  5. 23 May, 2020 7 commits
    • Ben Gamari's avatar
      git: Add ignored commits file · 7ae57afd
      Ben Gamari authored
      This can be used to tell git to ignore bulk renaming commits like the
      recently-finished module hierarchy refactoring. Configured with,
      
          git config blame.ignoreRevsFile .git-ignore-revs
      7ae57afd
    • Ben Gamari's avatar
      users-guide: Clarify meaning of -haddock flag · 856adf54
      Ben Gamari authored
      Fixes #18206.
      856adf54
    • Ben Gamari's avatar
      Bump process submodule · a60dc835
      Ben Gamari authored
      Fixes #17926.
      a60dc835
    • John Ericson's avatar
      Fix #18145 and also avoid needless work with implicit vars · 82cb8913
      John Ericson authored
       - `forAllOrNothing` now is monadic, so we can trace whether we bind
         an explicit `forall` or not.
      
       - #18145 arose because the free vars calculation was needlessly
         complex. It is now greatly simplified.
      
       - Replaced some other implicit var code with `filterFreeVarsToBind`.
      Co-authored-by: Ryan Scott's avatarRyan Scott <ryan.gl.scott@gmail.com>
      82cb8913
    • Ben Gamari's avatar
      simplCore: Ignore ticks in rule templates · dcd6bdcc
      Ben Gamari authored
      This fixes #17619, where a tick snuck in to the template of a rule,
      resulting in a panic during rule matching. The tick in question was
      introduced via post-inlining, as discussed in `Note [Simplifying
      rules]`. The solution we decided upon was to simply ignore ticks in the
      rule template, as discussed in `Note [Tick annotations in RULE
      matching]`.
      
      Fixes #18162.
      Fixes #17619.
      dcd6bdcc
    • Andrew Martin's avatar
      Implement cstringLength# and FinalPtr · 49301ad6
      Andrew Martin authored
      This function and its accompanying rule resolve issue #5218.
      A future PR to the bytestring library will make the internal
      Data.ByteString.Internal.unsafePackAddress compute string length
      with cstringLength#. This will improve the status quo because it is
      eligible for constant folding.
      
      Additionally, introduce a new data constructor to ForeignPtrContents
      named FinalPtr. This additional data constructor, when used in the
      IsString instance for ByteString, leads to more Core-to-Core
      optimization opportunities, fewer runtime allocations, and smaller
      binaries.
      
      Also, this commit re-exports all the functions from GHC.CString
      (including cstringLength#) in GHC.Exts. It also adds a new test
      driver. This test driver is used to perform substring matches on Core
      that is dumped after all the simplifier passes. In this commit, it is
      used to check that constant folding of cstringLength# works.
      49301ad6
    • Adam Sandberg Eriksson's avatar
      docs: fix formatting and add some links · d830bbc9
      Adam Sandberg Eriksson authored
      [skip ci]
      d830bbc9
  6. 21 May, 2020 7 commits