HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

ModuleCabal-syntax-3.12.1.0Haskell2010

Distribution.Backpack

This module defines the core data types for Backpack. For more details, see:

https://github.com/ezyang/ghc-proposals/blob/backpack/proposals/0000-backpack.rst

  • 4 types
  • 12 values

OpenUnitId

3 declarations
datadata OpenUnitId
#

An OpenUnitId describes a (possibly partially) instantiated Backpack component, with a description of how the holes are filled in. Unlike OpenUnitId, the ModuleSubst is kept in a structured form that allows for substitution (which fills in holes.) This form of unit cannot be installed. It must first be converted to a UnitId.

In the absence of Backpack, there are no holes to fill, so any such component always has an empty module substitution; thus we can lossily represent it as a 'DefiniteUnitId uid'.

For a source component using Backpack, however, there is more structure as components may be parametrized over some signatures, and these "holes" may be partially or wholly filled.

OpenUnitId plays an important role when we are mix-in linking, and is recorded to the installed packaged database for indefinite packages; however, for compiled packages that are fully instantiated, we instantiate OpenUnitId into UnitId.

For more details see the Backpack spec https://github.com/ezyang/ghc-proposals/blob/backpack/proposals/0000-backpack.rst

Constructors

Instances12Eq, Data, Ord, Read, Show, Generic, …

DefUnitId

3 declarations
newtypenewtype DefUnitId
#

A UnitId for a definite package. The DefUnitId invariant says that a UnitId identified this way is definite; i.e., it has no unfilled holes.

Instances12Eq, Data, Ord, Read, Show, Generic, …

OpenModule

2 declarations
datadata OpenModule
#

Unlike a Module, an OpenModule is either an ordinary module from some unit, OR an OpenModuleVar, representing a hole that needs to be filled in. Substitutions are over module variables.

Instances13Eq, Data, Ord, Read, Show, Generic, …

OpenModuleSubst

6 declarations

Conversions to UnitId

2 declarations