HORIZON HASKELLDocslts/ghc-10.0.xaa25b892026-10-10Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · aa25b89 · 2026-10-10

Moduleghc-lib-parser-9.14.1.20251220GHC2021

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
  • 246 values

Helper functions defined here

2 declarations

All wired in things

6 declarations
valueisBuiltInOcc :: OccName -> Bool
#

Check 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 `()`, `()`, `(), ...

Bool

12 declarations

Ordering

10 declarations

Boxing primitive types

2 declarations
valueboxingDataCon :: Type -> BoxingInfo b
#

Given 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]

Char

7 declarations

Double

4 declarations

Float

4 declarations

Int

6 declarations

Word

4 declarations

Word8

3 declarations

List

15 declarations
valueextractPromotedList
  1. :: Type

    The promoted list

  2. -> [Type]
#

Extract the elements of a promoted list. Panics if the type is not a promoted list

Maybe

11 declarations

Tuples

28 declarations
valuemkTupleTy :: Boxity -> [Type] -> Type
#

Make a tuple type. The list of types should not include any RuntimeRep specifications. Boxed 1-tuples are flattened. See Note [One-tuples]

valuemkTupleTy1 :: Boxity -> [Type] -> Type
#

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

valuemkBoxedTupleTy :: [Type] -> Type
#

Build the type of a small tuple that holds the specified type of thing Flattens 1-tuples. See Note [One-tuples].

Constraint tuples

Any

4 declarations

Recovery TyCon

1 declaration

Sums

5 declarations

Kinds

24 declarations

Equality predicates

13 declarations

RuntimeRep and friends

11 declarations

Levity

35 declarations

Multiplicity and friends

14 declarations

Bignum

17 declarations

Should 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].