Skip to content
Snippets Groups Projects
This project is mirrored from https://*****:*****@gitlab.haskell.org/ghc/ghc.git. Pull mirroring failed .
Repository mirroring has been paused due to too many failed attempts. It can be resumed by a project maintainer or owner.
Last successful update .
  1. Jun 06, 2023
  2. Jun 05, 2023
    • sheaf's avatar
      TTG: only allow VarBind at GhcTc · 58ccf02e
      sheaf authored and Marge Bot's avatar Marge Bot committed
      The VarBind constructor of HsBind is only used at the GhcTc stage.
      This commit makes that explicit by setting the extension field of
      VarBind to be DataConCantHappen at all other stages.
      
      This allows us to delete a dead code path in GHC.HsToCore.Quote.rep_bind,
      and remove some panics.
      58ccf02e
    • Matthew Pickering's avatar
      testsuite: Accept new output for CountDepsAst and CountDepsParser tests · 698d160c
      Matthew Pickering authored
      These are in a separate commit as the improvement to these tests is the
      cumulative effect of the previous set of patches rather than just the
      responsibility of the last one in the patchset.
      698d160c
    • Matthew Pickering's avatar
      Remove unecessary SOURCE import · 52d6a7d7
      Matthew Pickering authored
      52d6a7d7
    • Matthew Pickering's avatar
      Move GHC.Core.Opt.CallerCC Types into separate module · 9e5246d7
      Matthew Pickering authored
      This allows `GHC.Driver.DynFlags` to depend on these types without
      depending on CoreM and hence the entire simplifier pipeline.
      
      We can also remove a hs-boot file with this change.
      9e5246d7
    • Matthew Pickering's avatar
      hole fit plugins: Split definition into own module · eb852371
      Matthew Pickering authored
      The hole fit plugins are defined in terms of TcM, a type we want to
      avoid depending on from `GHC.Tc.Errors.Types`. By moving it into its own
      module we can remove this dependency. It also simplifies the necessary
      boot file.
      eb852371
    • Matthew Pickering's avatar
    • Matthew Pickering's avatar
      Move isIrrefutableHsPat to GHC.Rename.Utils and rename to isIrrefutableHsPatRn · 18db5ada
      Matthew Pickering authored
      This removes edge from GHC.Hs.Pat to GHC.Driver.Session, which makes
      Language.Haskell.Syntax end up depending on GHC.Driver.Session.
      18db5ada
    • Matthew Pickering's avatar
      Remove dependency of GHC.Tc.Utils.TcType on GHC.Driver.Session · 3d8d39d1
      Matthew Pickering authored
      This removes the usage of DynFlags from Tc.Utils.TcType  so that it no
      longer depends on GHC.Driver.Session. In general we don't want anything
      which is a dependency of Language.Haskell.Syntax to depend on
      GHC.Driver.Session and removing this edge gets us closer to that goal.
      3d8d39d1
    • Matthew Pickering's avatar
      Big TcLclEnv and CtLoc refactoring · 7cd8a61e
      Matthew Pickering authored
      The overall goal of this refactoring is to reduce the dependency
      footprint of the parser and syntax tree. Good reasons include:
      
      - Better module graph parallelisability
      - Make it easier to migrate error messages without introducing module loops
      - Philosophically, there's not reason for the AST to depend on half the
        compiler.
      
      One of the key edges which added this dependency was
      
      > GHC.Hs.Expr -> GHC.Tc.Types (TcLclEnv)
      
      As this in turn depending on TcM which depends on HscEnv and so on.
      
      Therefore the goal of this patch is to move `TcLclEnv` out of
      `GHC.Tc.Types` so that `GHC.Hs.Expr` can import TcLclEnv without
      incurring a huge dependency chain.
      
      The changes in this patch are:
      
      * Move TcLclEnv from GHC.Tc.Types to GHC.Tc.Types.LclEnv
      * Create new smaller modules for the types used in TcLclEnv
        New Modules:
        - GHC.Tc.Types.ErrCtxt
        - GHC.Tc.Types.BasicTypes
        - GHC.Tc.Types.TH
        - GHC.Tc.Types.LclEnv
        - GHC.Tc.Types.CtLocEnv
        - GHC.Tc.Errors.Types.PromotionErr
      
        Removed Boot File:
        - {-# SOURCE #-} GHC.Tc.Types
      
      * Introduce TcLclCtxt, the part of the TcLclEnv which doesn't
        participate in restoreLclEnv.
      
      * Replace TcLclEnv in CtLoc with specific CtLocEnv which is defined in
        GHC.Tc.Types.CtLocEnv. Use CtLocEnv in Implic and CtLoc to record the
        location of the implication and constraint.
      
      By splitting up TcLclEnv from GHC.Tc.Types we allow GHC.Hs.Expr to no
      longer depend on the TcM monad and all that entails.
      
      Fixes #23389 #23409
      7cd8a61e
  3. Jun 03, 2023
  4. Jun 02, 2023
  5. Jun 01, 2023
  6. May 31, 2023
    • mimi.vx's avatar
      Update rdt-theme to latest upstream version · 70526f5b
      mimi.vx authored and Marge Bot's avatar Marge Bot committed
      Fixes #23444
      70526f5b
    • sheaf's avatar
      Restructure the zonker · f62d8195
      sheaf authored and Marge Bot's avatar Marge Bot committed
      This commit splits up the zonker into a few separate components, described
      in Note [The structure of the zonker] in `GHC.Tc.Zonk.Type`.
      
      1. `GHC.Tc.Zonk.Monad` introduces a pared-down `TcM` monad, `ZonkM`,
           which has enough information for zonking types.
           This allows us to refactor `ErrCtxt` to use `ZonkM` instead of `TcM`,
           which guarantees we don't throw an error while reporting an error.
      
      2. `GHC.Tc.Zonk.Env` is the new home of `ZonkEnv`, and also defines
          two zonking monad transformers, `ZonkT` and `ZonkBndrT`.
          `ZonkT` is a reader monad transformer over `ZonkEnv`.
          `ZonkBndrT m` is the codensity monad over `ZonkT m`.
      
           `ZonkBndrT` is used for computations that accumulate binders
           in the `ZonkEnv`.
      
      3. `GHC.Tc.Zonk.TcType` contains the code for zonking types, for use
          in the typechecker. It uses the `ZonkM` monad.
      
      4. `GHC.Tc.Zonk.Type` contains the code for final zonking to `Type`,
          which has been refactored to use `ZonkTcM = ZonkT TcM` and
          `ZonkBndrTcM = ZonkBndrT TcM`.
      
      Allocations slightly decrease on the whole due to using
      continuation-passing style instead of manual state passing of ZonkEnv
      in the final zonking to Type.
      
      -------------------------
      Metric Decrease:
          T4029
          T8095
          T14766
          T15304
          hard_hole_fits
          RecordUpdPerf
      Metric Increase:
          T10421
      -------------------------
      f62d8195
    • sheaf's avatar
      Introduce Codensity monad · 88cc19b3
      sheaf authored and Marge Bot's avatar Marge Bot committed
      The Codensity monad is useful to write state-passing computations in
      continuation-passing style, e.g. to implement a State monad as
      continuation-passing style over a Reader monad.
      88cc19b3
    • sheaf's avatar
      Split off TcRef into its own module · 09d4d307
      sheaf authored and Marge Bot's avatar Marge Bot committed
      This helps avoid pull in the full TcM monad when we just want access
      to mutable references in the typechecker. This facilitates later patches
      which introduce a slimmed down TcM monad for zonking.
      09d4d307
    • sheaf's avatar
      Split off TcBinderStack into its own module · 5366cd35
      sheaf authored and Marge Bot's avatar Marge Bot committed
      This commit splits off TcBinderStack into its own module,
      to avoid module cycles: we might want to refer to it without also
      pulling in the TcM monad.
      5366cd35
    • sheaf's avatar
      Data.Bag: add INLINEABLE to polymorphic functions · d56dd695
      sheaf authored and Marge Bot's avatar Marge Bot committed
      This commit allows polymorphic methods in GHC.Data.Bag to be
      specialised, avoiding having to pass explicit dictionaries when they
      are instantiated with e.g. a known monad.
      d56dd695
    • Arnaud Spiwack's avatar
      Push coercions across multiplicity boundaries · bf9344d2
      Arnaud Spiwack authored and Marge Bot's avatar Marge Bot committed
      Per the new `Note [Linting linearity]`, we want optimisations over
      trying to preserve linearity. This will avoid preventing inlinings and
      reductions and make linear programs more efficient.
      bf9344d2
Loading