finos/morphir-elm/2.1.0

NOTE: the latest version is 22.0.2

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

Morphir.IR.Module

Modules are groups of types and values that belong together.

Specification and Definition

type alias Specification ta =
{ types : Dict Name (Documented (Specification ta))
, values : Dict Name (Specification ta)
}

Type that represents a module specification.

type alias Definition ta va =
{ types :
Dict Name (AccessControlled (Documented (Definition ta)))
, values : Dict Name (AccessControlled (Definition ta va))
}

Type that represents a module definition. It includes types and values.

Lookups

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

Look up a type specification by its name in a module specification.

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

Look up a value specification by its name in a module specification.

Other Utilities

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