Distribution.Backpack.ModuleShape

Cabal-3.11.0.0: A framework for packaging Haskell software

Safe Haskell | None
Language | Haskell2010

Distribution.Backpack.ModuleShape

Contents

- Module shapes

Description

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

Synopsis

- data ModuleShape = ModuleShape {
  - modShapeProvides :: OpenModuleSubst
  - modShapeRequires :: Set ModuleName
  }
- emptyModuleShape :: ModuleShape
- shapeInstalledPackage :: InstalledPackageInfo -> ModuleShape

# Module shapes

data ModuleShape Source #

A `ModuleShape` describes the provisions and requirements of a library. We can extract a `ModuleShape` from an `InstalledPackageInfo`.

Constructors

ModuleShape |
Fields modShapeProvides :: OpenModuleSubst modShapeRequires :: Set ModuleName

#### Instances

Instances details

ModSubst ModuleShape Source # |
Instance details Defined in Distribution.Backpack.ModuleShape Methods modSubst :: OpenModuleSubst -> ModuleShape -> ModuleShape Source #
Structured ModuleShape Source # |
Instance details Defined in Distribution.Backpack.ModuleShape Methods structure :: Proxy ModuleShape -> Structure Source # structureHash' :: Tagged ModuleShape MD5
Binary ModuleShape Source # |
Instance details Defined in Distribution.Backpack.ModuleShape Methods put :: ModuleShape -> Put # get :: Get ModuleShape # putList :: [ModuleShape] -> Put #
Generic ModuleShape Source # |
Instance details Defined in Distribution.Backpack.ModuleShape Associated Types
type Rep ModuleShape |
Instance details Defined in Distribution.Backpack.ModuleShape type Rep ModuleShape = D1 ('MetaData "ModuleShape" "Distribution.Backpack.ModuleShape" "Cabal-3.11.0.0-7503" 'False) (C1 ('MetaCons "ModuleShape" 'PrefixI 'True) (S1 ('MetaSel ('Just "modShapeProvides") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 OpenModuleSubst) :*: S1 ('MetaSel ('Just "modShapeRequires") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Set ModuleName))))
Methods from :: ModuleShape -> Rep ModuleShape x # to :: Rep ModuleShape x -> ModuleShape #
Show ModuleShape Source # |
Instance details Defined in Distribution.Backpack.ModuleShape Methods showsPrec :: Int -> ModuleShape -> ShowS # show :: ModuleShape -> String # showList :: [ModuleShape] -> ShowS #
Eq ModuleShape Source # |
Instance details Defined in Distribution.Backpack.ModuleShape Methods (==) :: ModuleShape -> ModuleShape -> Bool # (/=) :: ModuleShape -> ModuleShape -> Bool #
type Rep ModuleShape Source # |
Instance details Defined in Distribution.Backpack.ModuleShape type Rep ModuleShape = D1 ('MetaData "ModuleShape" "Distribution.Backpack.ModuleShape" "Cabal-3.11.0.0-7503" 'False) (C1 ('MetaCons "ModuleShape" 'PrefixI 'True) (S1 ('MetaSel ('Just "modShapeProvides") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 OpenModuleSubst) :*: S1 ('MetaSel ('Just "modShapeRequires") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Set ModuleName))))

emptyModuleShape :: ModuleShape Source #

The default module shape, with no provisions and no requirements.

shapeInstalledPackage :: InstalledPackageInfo -> ModuleShape Source #