Skip to content
Snippets Groups Projects
  1. Aug 07, 2024
  2. Aug 06, 2024
    • Rodrigo Mesquita's avatar
      hi: Deterministic ImportedMods in Usages · a1e42e7a
      Rodrigo Mesquita authored and Marge Bot's avatar Marge Bot committed
      The `mi_usages` field of the interface files must use a deterministic
      list of `Usage`s to guarantee a deterministic interface. However, this
      list was, in its origins, constructed from a `ModuleEnv` which uses a
      non-deterministic ordering that was leaking into the interface.
      
      Specifically, ImportedMods = ModuleEnv ... would get converted to a list and
      then passed to `mkUsageInfo` to construct the Usages.
      
      The solution is simple. Back `ImportedMods` with a deterministic map.
      `Map Module ...` is enough, since the Ord instance for `Module` already
      uses a stable, deterministic, comparison.
      
      Fixes #25131
      a1e42e7a
  3. Aug 03, 2024
  4. Aug 02, 2024
    • Brandon Chinn's avatar
      Implement MultilineStrings (#24390) · 66e7f57d
      Brandon Chinn authored
      This commit adds support for multiline strings, proposed at
      https://github.com/ghc-proposals/ghc-proposals/pull/569.
      Multiline strings can now be written as:
      
          myString =
            """
            this is a
            multiline string
            """
      
      The multiline string will have leading indentation stripped away.
      Full details of this post-processing may be found at the new
      GHC.Parser.String module.
      
      In order to cleanly implement this and maximize reusability, I
      broke out the lexing logic for strings out of Lexer.x into a
      new GHC.Parser.String module, which lexes strings with any
      provided "get next character" function. This also gave us the
      opportunity to clean up this logic, and even optimize it a bit.
      With this change, parsing string literals now takes 25% less
      time and 25% less space.
      66e7f57d
    • Andrei Borzenkov's avatar
      Type syntax in expressions (#24159, #24572, #24226) · 8b2f70a2
      Andrei Borzenkov authored and Marge Bot's avatar Marge Bot committed
      
      This patch extends the grammar of expressions with syntax that is
      typically found only in types:
        * function types (a -> b), (a ->. b), (a %m -> b)
        * constrained types (ctx => t)
        * forall-quantification (forall tvs. t)
      
      The new forms are guarded behind the RequiredTypeArguments extension,
      as specified in GHC Proposal #281. Examples:
      
        {-# LANGUAGE RequiredTypeArguments #-}
        e1 = f (Int    -> String)          -- function type
        e2 = f (Int %1 -> String)          -- linear function type
        e3 = f (forall a. Bounded a => a)  -- forall type, constraint
      
      The GHC AST and the TH AST have been extended as follows:
      
         syntax        | HsExpr   | TH.Exp
        ---------------+----------+--------------
         a -> b        | HsFunArr | ConE (->)
         a %m -> b     | HsFunArr | ConE FUN
         ctx => t      | HsQual   | ConstrainedE
         forall a. t   | HsForAll | ForallE
         forall a -> t | HsForAll | ForallVisE
      
      Additionally, a new warning flag -Wview-pattern-signatures has been
      introduced to aid with migration to the new precedence of (e -> p :: t).
      
      Co-authored-by: default avatarVladislav Zavialov <vlad.z.4096@gmail.com>
      8b2f70a2
  5. Aug 01, 2024
  6. Jul 30, 2024
  7. Jul 29, 2024
  8. Jul 28, 2024
  9. Jul 27, 2024
    • Torsten Schmits's avatar
      add missing cell in flavours table · 646ee207
      Torsten Schmits authored and Marge Bot's avatar Marge Bot committed
      646ee207
    • Simon Peyton Jones's avatar
      Fix nasty bug in occurrence analyser · f6b4c1c9
      Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
      As #25096 showed, the occurrence analyser was getting one-shot info
      flat out wrong.
      
      This commit does two things:
      
      * It fixes the bug and actually makes the code a bit tidier too.
        The work is done in the new function
           GHC.Core.Opt.OccurAnal.mkRhsOccEnv,
        especially the bit that prepares the `occ_one_shots` for the RHS.
      
        See Note [The OccEnv for a right hand side]
      
      * When floating out a binding we must be conservative about one-shot
        info.  But we were zapping the entire demand info, whereas we only
        really need zap the /top level/ cardinality.
      
        See Note [Floatifying demand info when floating]
        in GHC.Core.Opt.SetLevels
      
      For some reason there is a 2.2% improvement in compile-time allocation
      for CoOpt_Read.  Otherwise nickels and dimes.
      
      Metric Decrease:
          CoOpt_Read
      f6b4c1c9
  10. Jul 25, 2024
    • Andreas Klebinger's avatar
      Fix -freg-graphs for FP and AARch64 NCG (#24941). · 3f89ab92
      Andreas Klebinger authored
      It seems we reserve 8 registers instead of four for global regs
      based on the layout in Note [AArch64 Register assignments].
      
      I'm not sure it's neccesary, but for now we just accept this state of
      affairs and simple update -fregs-graph to account for this.
      3f89ab92
  11. Jul 24, 2024
  12. Jul 19, 2024
  13. Jul 17, 2024
  14. Jul 16, 2024
  15. Jul 15, 2024
  16. Jul 13, 2024
  17. Jul 12, 2024
Loading