The Metadata module analyses a distribution for the type of metadata information that would be helpful in automating things like data dictionaries, lineage tracking, and the such.
Dict Morphir.IR.FQName.FQName Morphir.IR.FQName.FQName
The registry of base types through the entire distribution. A base type is any union type that has only one single-argument option.
An enum extension is a special pattern of union type that is either an enum or a name with no arguments
Dict Morphir.IR.FQName.FQName (List Morphir.IR.Name.Name)
The registry of enums through the entire distribution. An enum is identified as any union type that has only non-argument options.
List Morphir.IR.Module.ModuleName
The registry of modules through entire distribution.
Dict Morphir.IR.FQName.FQName (Morphir.Scala.AST.Documented (Morphir.IR.Type.Definition ta))
The registry of types through entire distribution.
Dict Morphir.IR.FQName.FQName Morphir.IR.FQName.FQName
The registry of aliases through the entire distribution. An alias is any type alias that aliases a non-record type.
Structure for holding metadata information from processing the distribution.
Dict Morphir.IR.FQName.FQName (Morphir.Scala.AST.Documented (Morphir.IR.Type.Definition ta))
The registry of union types through the entire distribution. A union type is any ADT that has more than one single-argument option.
mapDistribution : Morphir.IR.Distribution.Distribution -> Metadata ()
Process this distribution into a Metadata structure.
getTypes : Metadata ta -> Types ta
Access function for getting the type registry from a Metadata structure.
getEnums : Metadata ta -> Enums
Access function for getting the enum registry from a Metadata structure.
getBaseTypes : Metadata ta -> BaseTypes
Access function for getting the base type registry from a Metadata structure.
getAliases : Metadata ta -> Aliases
Access function for getting the alias type registry from a Metadata structure.
getDocumentation : Metadata ta -> Morphir.IR.FQName.FQName -> Maybe String
Access function for getting the full type registry from a Metadata structure.
getModules : Metadata ta -> Modules
Access function for getting the module registry from a Metadata structure.
getEnumsWithExtensions : Metadata ta -> Enums
Access function for getting the enum registry from a Metadata structure that includes EnumExtensions.
enumExtensionName : EnumExtensionComponent -> List Morphir.IR.Name.Name
Extract the names out of an enum extension.
getUnions : Metadata ta -> UnionTypes ta
Access function for getting the union type registry from a Metadata structure.
isEnumExtension : Metadata a -> Morphir.IR.Type.Constructors a -> Basics.Bool
Decides whether a union type is an enum by ensuring it only has constructors with base type enum or no arg constructors.