finos/morphir-elm/4.0.0

NOTE: the latest version is 22.0.2

Formerly Morgan-Stanley/morphir-elm. Search finds this package by either name.

Morphir.IR.Package

Tools to work with packages.

type alias Specification ta =
{ modules : Dict ModuleName (Specification ta) }

Type that represents a package specification.

type alias Definition ta va =
{ modules : Dict ModuleName (AccessControlled (Definition ta va))
}

Type that represents a package definition.

emptyDefinition : Definition ta va

An empty package definition.

Lookups

lookupModuleSpecification : Path -> Specification ta -> Maybe (Specification ta)

Look up a module specification by its path in a package specification.

lookupTypeSpecification : Path -> Name -> Specification ta -> Maybe (Specification ta)

Look up a type specification by its module path and name in a package specification.

lookupValueSpecification : Path -> Name -> Specification ta -> Maybe (Specification ta)

Look up a value specification by its module path and name in a package specification.

Other utilities

type alias PackageName =
Path
definitionToSpecification : Definition ta va -> Specification ta
eraseDefinitionAttributes : Definition ta va -> Definition () ()
eraseSpecificationAttributes : Specification ta -> Specification ()
mapDefinitionAttributes : (ta -> tb) -> (va -> vb) -> Definition ta va -> Definition tb vb
mapSpecificationAttributes : (ta -> tb) -> (va -> vb) -> Specification ta -> Specification tb