Skip to content
Snippets Groups Projects
  1. Dec 17, 2020
    • Alex D's avatar
      Force module recompilation if '*' prefix was used to load modules in ghci (#8042) · 09f28390
      Alex D authored and Marge Bot's avatar Marge Bot committed
      Usually pre-compiled code is preferred to be loaded in ghci if available, which means
      that if we try to load module with '*' prefix and compilation artifacts are available
      on disc (.o and .hi files) or the source code was untouched, the driver would think
      no recompilation is required. Therefore, we need to force recompilation so that desired
      byte-code is generated and loaded. Forcing in this case should be ok, since this is what
      happens for interpreted code anyways when reloading modules.
      09f28390
    • davide's avatar
      User guide minor typo · 80df2edd
      davide authored and Marge Bot's avatar Marge Bot committed
      [ci skip]
      80df2edd
  2. Dec 16, 2020
  3. Dec 15, 2020
  4. Dec 14, 2020
    • Andrew Martin's avatar
      Implement BoxedRep proposal · 6c2eb223
      Andrew Martin authored and Ben Gamari's avatar Ben Gamari committed
      This implements the BoxedRep proposal, refacoring the `RuntimeRep`
      hierarchy from:
      
      ```haskell
      data RuntimeRep = LiftedPtrRep | UnliftedPtrRep | ...
      ```
      
      to
      
      ```haskell
      data RuntimeRep = BoxedRep Levity | ...
      data Levity = Lifted | Unlifted
      ```
      
      Closes #17526.
      6c2eb223
    • Ben Gamari's avatar
      Optimise nullary type constructor usage · dad87210
      Ben Gamari authored
      During the compilation of programs GHC very frequently deals with
      the `Type` type, which is a synonym of `TYPE 'LiftedRep`. This patch
      teaches GHC to avoid expanding the `Type` synonym (and other nullary
      type synonyms) during type comparisons, saving a good amount of work.
      This optimisation is described in `Note [Comparing nullary type
      synonyms]`.
      
      To maximize the impact of this optimisation, we introduce a few
      special-cases to reduce `TYPE 'LiftedRep` to `Type`. See
      `Note [Prefer Type over TYPE 'LiftedPtrRep]`.
      
      Closes #17958.
      
      Metric Decrease:
         T18698b
         T1969
         T12227
         T12545
         T12707
         T14683
         T3064
         T5631
         T5642
         T9020
         T9630
         T9872a
         T13035
         haddock.Cabal
         haddock.base
      dad87210
    • Andreas Klebinger's avatar
      Optimize dumping of consecutive whitespace. · af855ac1
      Andreas Klebinger authored
      The naive way of putting out n characters of indent would be something
      like `hPutStr hdl (replicate n ' ')`. However this is quite inefficient
      as we allocate an absurd number of strings consisting of simply spaces
      as we don't cache them.
      
      To improve on this we now track if we can simply write ascii spaces via
      hPutBuf instead. This is the case when running with -ddump-to-file where
      we force the encoding to be UTF8.
      
      This avoids both the cost of going through encoding as well as avoiding
      allocation churn from all the white space. Instead we simply use hPutBuf
      on a preallocated unlifted string.
      
      When dumping stg like this:
      
      > nofib/spectral/simple/Main.hs -fforce-recomp -ddump-stg-final -ddump-to-file -c +RTS -s
      
      Allocations went from 1,778 MB to 1,702MB. About a 4% reduction of
      allocation! I did not measure the difference in runtime but expect it
      to be similar.
      
      Bumps the haddock submodule since the interface of GHC's Pretty
      slightly changed.
      
      -------------------------
      Metric Decrease:
          T12227
      -------------------------
      af855ac1
    • Sylvain Henry's avatar
      Move Unit related fields from DynFlags to HscEnv · d0e8c10d
      Sylvain Henry authored
      The unit database cache, the home unit and the unit state were stored in
      DynFlags while they ought to be stored in the compiler session state
      (HscEnv). This patch fixes this.
      
      It introduces a new UnitEnv type that should be used in the future to
      handle separate unit environments (especially host vs target units).
      
      Related to #17957
      
      Bump haddock submodule
      d0e8c10d
    • Ben Gamari's avatar
      Revert "Optimise nullary type constructor usage" · 92377c27
      Ben Gamari authored
      This was inadvertently merged.
      
      This reverts commit 7e9debd4.
      92377c27
    • Ben Gamari's avatar
      Optimise nullary type constructor usage · 7e9debd4
      Ben Gamari authored
      During the compilation of programs GHC very frequently deals with
      the `Type` type, which is a synonym of `TYPE 'LiftedRep`. This patch
      teaches GHC to avoid expanding the `Type` synonym (and other nullary
      type synonyms) during type comparisons, saving a good amount of work.
      This optimisation is described in `Note [Comparing nullary type
      synonyms]`.
      
      To maximize the impact of this optimisation, we introduce a few
      special-cases to reduce `TYPE 'LiftedRep` to `Type`. See
      `Note [Prefer Type over TYPE 'LiftedPtrRep]`.
      
      Closes #17958.
      
      Metric Decrease:
         T18698b
         T1969
         T12227
         T12545
         T12707
         T14683
         T3064
         T5631
         T5642
         T9020
         T9630
         T9872a
         T13035
         haddock.Cabal
         haddock.base
      7e9debd4
    • cgibbard's avatar
      Implement type applications in patterns · c696bb2f
      cgibbard authored and Ben Gamari's avatar Ben Gamari committed
      The haddock submodule is also updated so that it understands the changes
      to patterns.
      c696bb2f
  5. Dec 13, 2020
  6. Dec 12, 2020
  7. Dec 11, 2020
  8. Dec 10, 2020
Loading