Moduleghc-10.0.0.20260917GHC2024
GHC.Builtin.Types
This module is about types that can be defined in Haskell, but which must be wired into the compiler nonetheless. C.f module GHC.Builtin.Types.Prim
- 1 type
- 248 values
- Packageghc-10.0.0.20260917
- Exports249
- LanguageGHC2024
- LicenceBSD-3-Clause
- SourceTypes.hs
Helper functions defined here
2 declarationsAll wired in things
6 declarationsCheck if the OccName is an occurrence of built-in syntax.
This is a variant of isBuiltInOcc_maybe that returns a Bool. See Note [isBuiltInOcc_maybe]
isBuiltInOcc holds for:
* function arrow ->
* list syntax `[]`, :
* boxed tuple syntax (), (,), (,,), (,,,), ...
* unboxed tuple syntax (##), `()`, `()`, ...
* unboxed sum type syntax (#|#), (#||#), (#|||#), ...
* unboxed sum data syntax `()`, `()`, `(), ...
Match on built-in syntax as it occurs at use sites. See Note [isBuiltInOcc_maybe]
Bool
14 declarationsOrdering
10 declarationsBoxing primitive types
2 declarationsGiven a type ty, if ty is not of kind Type, return a data constructor that
will box it, and the type of the boxed thing, which does now have kind Type.
See Note [Boxing constructors]
Constructors
Char
7 declarationsDouble
4 declarationsFloat
4 declarationsInt
6 declarationsWord
4 declarationsWord8
3 declarationsList
15 declarationsMake a *promoted* list.
Extract the elements of a promoted list. Panics if the type is not a promoted list
Maybe
11 declarationsTuples
28 declarationsMake a tuple type. The list of types should not include any RuntimeRep specifications. Boxed 1-tuples are flattened. See Note [One-tuples]
Make a tuple type. The list of types should not include any RuntimeRep specifications. Boxed 1-tuples are *not* flattened. See Note [One-tuples] and Note [Don't flatten tuples from HsSyn] in GHC.Core.Make
Build the type of a small tuple that holds the specified type of thing Flattens 1-tuples. See Note [One-tuples].
Specialization of unboxedTupleSumKind for tuples
Specialization of unboxedTupleSumKind for sums
Constraint tuples
Any
4 declarationsRecovery TyCon
1 declarationMake a fake, recovery TyCon from an existing one. Used when recovering from errors in type declarations
Sums
5 declarationsType constructor for n-ary unboxed sum.
Data constructor for i-th alternative of a n-ary unboxed sum.
Kinds
24 declarationstype LiftedRep = 'BoxedRep 'Liftedtype UnliftedRep = 'BoxedRep 'UnliftedEquality predicates
13 declarationsRuntimeRep and friends
11 declarationsLevity
35 declarationsMultiplicity and friends
14 declarationsBignum
17 declarationsShould this name be considered in-scope, even though it technically isn't?
This ensures that we don't filter out information because, e.g., Data.Kind.Type isn't imported.
See Note [pretendNameIsInScope].