Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
-
93a2b20f
by Andreas Klebinger at 2026-08-18T04:31:04-04:00
7 changed files:
- compiler/GHC/Builtin/WiredIn/Types.hs
- compiler/GHC/CmmToAsm/Format.hs
- compiler/GHC/Driver/GenerateCgIPEStub.hs
- compiler/GHC/Iface/Tidy/StaticPtrTable.hs
- compiler/GHC/Tc/Solver/InertSet.hs
- compiler/GHC/Types/Id/Make.hs
- compiler/GHC/Types/Var.hs
Changes:
| ... | ... | @@ -783,7 +783,7 @@ typeSymbolKind = mkTyConTy typeSymbolKindCon |
| 783 | 783 | Note [How tuples work]
|
| 784 | 784 | ~~~~~~~~~~~~~~~~~~~~~~
|
| 785 | 785 | * There are three families of tuple TyCons and corresponding
|
| 786 | - DataCons, expressed by the type BasicTypes.TupleSort:
|
|
| 786 | + DataCons, expressed by the type GHC.Types.Basic.TupleSort:
|
|
| 787 | 787 | data TupleSort = BoxedTuple | UnboxedTuple | ConstraintTuple
|
| 788 | 788 | |
| 789 | 789 | * All three families are AlgTyCons, whose AlgTyConRhs is TupleTyCon
|
| ... | ... | @@ -818,7 +818,7 @@ Note [How tuples work] |
| 818 | 818 | stores them in the context field of types like HsQualTy.
|
| 819 | 819 | |
| 820 | 820 | * In quite a lot of places things are restricted just to
|
| 821 | - BoxedTuple/UnboxedTuple, and then we used BasicTypes.Boxity to distinguish
|
|
| 821 | + BoxedTuple/UnboxedTuple, and then we used GHC.Types.Basic.Boxity to distinguish
|
|
| 822 | 822 | E.g. tupleTyCon has a Boxity argument
|
| 823 | 823 | |
| 824 | 824 | * When looking up an OccName in the original-name cache
|
| ... | ... | @@ -52,20 +52,20 @@ import GHC.Utils.Panic |
| 52 | 52 | GHC has severals types that represent various aspects of data format.
|
| 53 | 53 | These include:
|
| 54 | 54 | |
| 55 | - * 'CmmType.CmmType': The data classification used throughout the C--
|
|
| 55 | + * 'GHC.Cmm.Type.CmmType': The data classification used throughout the C--
|
|
| 56 | 56 | pipeline. This is a pair of a CmmCat and a Width.
|
| 57 | 57 | |
| 58 | - * 'CmmType.CmmCat': What the bits in a C-- value mean (e.g. a pointer, integer, or floating-point value)
|
|
| 58 | + * 'GHC.Cmm.Type.CmmCat': What the bits in a C-- value mean (e.g. a pointer, integer, or floating-point value)
|
|
| 59 | 59 | |
| 60 | - * 'CmmType.Width': The width of a C-- value.
|
|
| 60 | + * 'GHC.Cmm.Type.Width': The width of a C-- value.
|
|
| 61 | 61 | |
| 62 | - * 'CmmType.Length': The width (measured in number of scalars) of a vector value.
|
|
| 62 | + * 'GHC.Cmm.Type.Length': The width (measured in number of scalars) of a vector value.
|
|
| 63 | 63 | |
| 64 | 64 | * 'Format.Format': The data format representation used by much of the backend.
|
| 65 | 65 | |
| 66 | - * 'Format.ScalarFormat': The format of a 'Format.VecFormat'\'s scalar.
|
|
| 66 | + * 'GHC.CmmToAsm.Format.ScalarFormat': The format of a 'GHC.CmmToAsm.Format.VecFormat'\'s scalar.
|
|
| 67 | 67 | |
| 68 | - * 'RegClass.RegClass': Whether a register is an integer or a floating point/vector register.
|
|
| 68 | + * 'GHC.Platform.Reg.Class.RegClass': Whether a register is an integer or a floating point/vector register.
|
|
| 69 | 69 | -}
|
| 70 | 70 | |
| 71 | 71 | -- It looks very like the old MachRep, but it's now of purely local
|
| ... | ... | @@ -62,7 +62,7 @@ looking up source locations for stack info tables in the map generated during th |
| 62 | 62 | |
| 63 | 63 | The rest of this note will document exactly how the first pass generates the map from labels to
|
| 64 | 64 | estimated source positions. The algorithms are different depending on whether tables-next-to-code
|
| 65 | -is on or off. Both algorithms have in common that we are looking for a `CmmNode.CmmTick`
|
|
| 65 | +is on or off. Both algorithms have in common that we are looking for a `GHC.Cmm.Node.CmmTick`
|
|
| 66 | 66 | (containing a `SourceNote`) that is near what we estimate to be the label of a return stack frame.
|
| 67 | 67 | |
| 68 | 68 | With tables-next-to-code
|
| ... | ... | @@ -112,14 +112,14 @@ open or closed on exit (one can fallthrough from them to the next node). |
| 112 | 112 | Please refer to the paper "Hoopl: A Modular, Reusable Library for Dataflow Analysis and Transformation"
|
| 113 | 113 | for a detailed explanation.
|
| 114 | 114 | |
| 115 | -Here we use the fact, that calls (represented by `CmmNode.CmmCall`) are always closed on exit
|
|
| 115 | +Here we use the fact, that calls (represented by `GHC.Cmm.Node.CmmCall`) are always closed on exit
|
|
| 116 | 116 | (`CmmNode O C`, `O` means open, `C` closed). In other words, they are always at the end of a block.
|
| 117 | 117 | |
| 118 | 118 | So, given a `CmmGraph`:
|
| 119 | - - Look at the end of every block: If it is a `CmmNode.CmmCall` returning to some label, lookup
|
|
| 120 | - the nearest `CmmNode.CmmTick` by traversing the middle part of the block backwards (from end to
|
|
| 119 | + - Look at the end of every block: If it is a `GHC.Cmm.Node.CmmCall` returning to some label, lookup
|
|
| 120 | + the nearest `GHC.Cmm.Node.CmmTick` by traversing the middle part of the block backwards (from end to
|
|
| 121 | 121 | beginning).
|
| 122 | - - Take the first `CmmNode.CmmTick` that contains a `Tickish.SourceNote` and map the label we
|
|
| 122 | + - Take the first `GHC.Cmm.Node.CmmTick` that contains a `Tickish.SourceNote` and map the label we
|
|
| 123 | 123 | found to it's payload as an `IpeSourceLocation`. (There are other `Tickish` constructors like
|
| 124 | 124 | `ProfNote` or `HpcTick`, these are ignored.)
|
| 125 | 125 |
| ... | ... | @@ -82,7 +82,7 @@ Here is a running example: |
| 82 | 82 | |
| 83 | 83 | (SF4) The desugarer replaces a nested expression (static e) with a top-level
|
| 84 | 84 | binding for an application of the function 'makeStatic' (defined in module
|
| 85 | - GHC.StaticPtr.Internal of base). So we get
|
|
| 85 | + GHC.Internal.StaticPtr.Internal of base). So we get
|
|
| 86 | 86 | |
| 87 | 87 | s = /\abc. makeStatic location e
|
| 88 | 88 | f x = ...(fromStaticPtr s)...
|
| ... | ... | @@ -460,7 +460,7 @@ In implementation terms |
| 460 | 460 | - It is only called when applying an instance decl,
|
| 461 | 461 | in GHC.Tc.Solver.Dict.tryInstances
|
| 462 | 462 | |
| 463 | - - ClsInst.InstanceWhat says what kind of instance was
|
|
| 463 | + - GHC.Tc.Instance.Class.InstanceWhat says what kind of instance was
|
|
| 464 | 464 | used to solve the constraint. In particular
|
| 465 | 465 | * LocalInstance identifies quantified constraints
|
| 466 | 466 | * BuiltinEqInstance identifies the strange built-in
|
| ... | ... | @@ -800,7 +800,7 @@ The InertCans represents a collection of constraints with the following properti |
| 800 | 800 | eg a wanted cannot rewrite a given)
|
| 801 | 801 | |
| 802 | 802 | * CEqCan equalities: see Note [inert_eqs: the inert equalities]
|
| 803 | - Also see documentation in Constraint.Ct for a list of invariants
|
|
| 803 | + Also see documentation in GHC.Tc.Types.Constraint.Ct for a list of invariants
|
|
| 804 | 804 | |
| 805 | 805 | Note [inert_eqs: the inert equalities]
|
| 806 | 806 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
| ... | ... | @@ -987,7 +987,7 @@ until the final simplifier phase; see Note [Activation for data |
| 987 | 987 | constructor wrappers].
|
| 988 | 988 | |
| 989 | 989 | For further reading, see:
|
| 990 | - * (IA1) in Note [Interesting arguments] in GHC.Core.Op.Simplify.Utils
|
|
| 990 | + * (IA1) in Note [Interesting arguments] in GHC.Core.Opt.Simplify.Utils
|
|
| 991 | 991 | * Note [Lone variables] in GHC.Core.Unfold
|
| 992 | 992 | * Note [exprIsConApp_maybe on data constructors with wrappers]
|
| 993 | 993 | in GHC.Core.SimpleOpt
|
| ... | ... | @@ -621,27 +621,27 @@ Note [Types for coercions, predicates, and evidence] |
| 621 | 621 | VarBndr is polymorphic in both var and visibility fields.
|
| 622 | 622 | Currently there are nine different uses of 'VarBndr':
|
| 623 | 623 | |
| 624 | -* Var.ForAllTyBinder = VarBndr TyCoVar ForAllTyFlag
|
|
| 624 | +* GHC.Types.Var.ForAllTyBinder = VarBndr TyCoVar ForAllTyFlag
|
|
| 625 | 625 | Binder of a forall-type; see ForAllTy in GHC.Core.TyCo.Rep
|
| 626 | 626 | |
| 627 | -* Var.TyVarBinder = VarBndr TyVar ForAllTyFlag
|
|
| 627 | +* GHC.Types.Var.TyVarBinder = VarBndr TyVar ForAllTyFlag
|
|
| 628 | 628 | Subset of ForAllTyBinder when we are sure the binder is a TyVar
|
| 629 | 629 | |
| 630 | -* Var.InvisTVBinder = VarBndr TyVar Specificity
|
|
| 630 | +* GHC.Types.Var.InvisTVBinder = VarBndr TyVar Specificity
|
|
| 631 | 631 | Specialised form of TyVarBinder, when ForAllTyFlag = Invisible s
|
| 632 | 632 | See GHC.Core.Type.splitForAllInvisTVBinders
|
| 633 | 633 | |
| 634 | -* Var.ReqTVBinder = VarBndr TyVar ()
|
|
| 634 | +* GHC.Types.Var.ReqTVBinder = VarBndr TyVar ()
|
|
| 635 | 635 | Specialised form of TyVarBinder, when ForAllTyFlag = Required
|
| 636 | 636 | See GHC.Core.Type.splitForAllReqTVBinders
|
| 637 | 637 | This one is barely used
|
| 638 | 638 | |
| 639 | -* TyCon.TyConBinder = VarBndr TyVar TyConBndrVis
|
|
| 639 | +* GHC.Core.TyCon.TyConBinder = VarBndr TyVar TyConBndrVis
|
|
| 640 | 640 | Binders of a TyCon; see TyCon in GHC.Core.TyCon
|
| 641 | 641 | |
| 642 | -* IfaceType.IfaceForAllBndr = VarBndr IfaceBndr ForAllTyFlag
|
|
| 643 | -* IfaceType.IfaceForAllSpecBndr = VarBndr IfaceBndr Specificity
|
|
| 644 | -* IfaceType.IfaceTyConBinder = VarBndr IfaceBndr TyConBndrVis
|
|
| 642 | +* GHC.Iface.Type.IfaceForAllBndr = VarBndr IfaceBndr ForAllTyFlag
|
|
| 643 | +* GHC.Iface.Type.IfaceForAllSpecBndr = VarBndr IfaceBndr Specificity
|
|
| 644 | +* GHC.Iface.Type.IfaceTyConBinder = VarBndr IfaceBndr TyConBndrVis
|
|
| 645 | 645 | -}
|
| 646 | 646 | |
| 647 | 647 | data VarBndr var argf = Bndr var argf
|