#finos/morphir-engine/ids

    Domain types for source languages, providers, profiles, backends, files and names. Today morphir.json discovery and the package name and exposed modules of plan parse text into them; the other entry points (CLI flags, TOML) follow with bead morphir-ukvn.5.32. Only the wire carries String. Each type wraps a String, has T::parse(String) -> T raise @config.Invalid and Show.

    TypeRuleError prefix
    LanguageIdlowercase letter, then lowercase letters, digits and -; at most 64 charactersfrontend.invalid_language
    ProfileIdsame as LanguageIdfrontend.invalid_profile
    BackendIdsame as LanguageIdfrontend.invalid_backend
    ProviderIdnon-empty, at most 256 characters, no control charactersfrontend.invalid_provider
    FileExtensionstarts with ., has more than the dot, no /, \, : or control charactersfrontend.invalid_extensions
    SourcePathrelative, / separators, no empty, . or .. part, no \, : or control charactersfrontend.invalid_source_path
    SourceModuleNamebounded identifier with no space, / or \; keeps the source syntax (Sub.Util)frontend.invalid_module
    SourcePackageNamebounded identifier that canonical_path converts; keeps its spellingfrontend.invalid_package

    SourcePackageName::to_path gives the canonical @ir.Path. canonical_path converts conventional spelling: My.Pkg and my/pkg both give my/pkg.

    let elm = "elm" |> @ids.LanguageId::parse

    BackendId

    pub struct BackendId(String) derive(Compare, Eq, Hash,
    Debug
    )

    A generation or output backend, for example moonbit.
    impl Show for BackendId

    BackendId::compare

    fn BackendId::compare(BackendId, BackendId) -> Int

    BackendId::equal

    fn BackendId::equal(BackendId, BackendId) -> Bool

    BackendId::hash

    fn BackendId::hash(self : BackendId) -> Int

    BackendId::hash_combine

    fn BackendId::hash_combine(BackendId, Hasher) -> Unit

    BackendId::not_equal

    fn BackendId::not_equal(x : BackendId, y : BackendId) -> Bool

    BackendId::op_ge

    fn BackendId::op_ge(x : BackendId, y : BackendId) -> Bool

    BackendId::op_gt

    fn BackendId::op_gt(x : BackendId, y : BackendId) -> Bool

    BackendId::op_le

    fn BackendId::op_le(x : BackendId, y : BackendId) -> Bool

    BackendId::op_lt

    fn BackendId::op_lt(x : BackendId, y : BackendId) -> Bool

    BackendId::output

    fn BackendId::output(self : BackendId, logger : &Logger) -> Unit

    BackendId::parse

    BackendId::to_string

    fn BackendId::to_string(self : BackendId) -> String

    FileExtension

    pub struct FileExtension(String) derive(Compare, Eq, Hash,
    Debug
    )

    A file extension with its leading dot, for example .elm.

    FileExtension::compare

    FileExtension::equal

    FileExtension::hash

    fn FileExtension::hash(self : FileExtension) -> Int

    FileExtension::hash_combine

    fn FileExtension::hash_combine(FileExtension, Hasher) -> Unit

    FileExtension::not_equal

    fn FileExtension::not_equal(x : FileExtension, y : FileExtension) -> Bool

    FileExtension::op_ge

    fn FileExtension::op_ge(x : FileExtension, y : FileExtension) -> Bool

    FileExtension::op_gt

    fn FileExtension::op_gt(x : FileExtension, y : FileExtension) -> Bool

    FileExtension::op_le

    fn FileExtension::op_le(x : FileExtension, y : FileExtension) -> Bool

    FileExtension::op_lt

    fn FileExtension::op_lt(x : FileExtension, y : FileExtension) -> Bool

    FileExtension::output

    fn FileExtension::output(self : FileExtension, logger : &Logger) -> Unit

    FileExtension::parse

    FileExtension::to_string

    fn FileExtension::to_string(self : FileExtension) -> String

    LanguageId

    pub struct LanguageId(String) derive(Compare, Eq, Hash,
    Debug
    )

    A source language, for example elm.
    impl Show for LanguageId

    LanguageId::compare

    fn LanguageId::compare(LanguageId, LanguageId) -> Int

    LanguageId::equal

    fn LanguageId::equal(LanguageId, LanguageId) -> Bool

    LanguageId::hash

    fn LanguageId::hash(self : LanguageId) -> Int

    LanguageId::hash_combine

    fn LanguageId::hash_combine(LanguageId, Hasher) -> Unit

    LanguageId::not_equal

    fn LanguageId::not_equal(x : LanguageId, y : LanguageId) -> Bool

    LanguageId::op_ge

    fn LanguageId::op_ge(x : LanguageId, y : LanguageId) -> Bool

    LanguageId::op_gt

    fn LanguageId::op_gt(x : LanguageId, y : LanguageId) -> Bool

    LanguageId::op_le

    fn LanguageId::op_le(x : LanguageId, y : LanguageId) -> Bool

    LanguageId::op_lt

    fn LanguageId::op_lt(x : LanguageId, y : LanguageId) -> Bool

    LanguageId::output

    fn LanguageId::output(self : LanguageId, logger : &Logger) -> Unit

    LanguageId::parse

    LanguageId::to_string

    fn LanguageId::to_string(self : LanguageId) -> String

    ProfileId

    pub struct ProfileId(String) derive(Compare, Eq, Hash,
    Debug
    )

    A source profile, for example library.
    impl Show for ProfileId

    ProfileId::compare

    fn ProfileId::compare(ProfileId, ProfileId) -> Int

    ProfileId::equal

    fn ProfileId::equal(ProfileId, ProfileId) -> Bool

    ProfileId::hash

    fn ProfileId::hash(self : ProfileId) -> Int

    ProfileId::hash_combine

    fn ProfileId::hash_combine(ProfileId, Hasher) -> Unit

    ProfileId::not_equal

    fn ProfileId::not_equal(x : ProfileId, y : ProfileId) -> Bool

    ProfileId::op_ge

    fn ProfileId::op_ge(x : ProfileId, y : ProfileId) -> Bool

    ProfileId::op_gt

    fn ProfileId::op_gt(x : ProfileId, y : ProfileId) -> Bool

    ProfileId::op_le

    fn ProfileId::op_le(x : ProfileId, y : ProfileId) -> Bool

    ProfileId::op_lt

    fn ProfileId::op_lt(x : ProfileId, y : ProfileId) -> Bool

    ProfileId::output

    fn ProfileId::output(self : ProfileId, logger : &Logger) -> Unit

    ProfileId::parse

    ProfileId::to_string

    fn ProfileId::to_string(self : ProfileId) -> String

    ProviderId

    pub struct ProviderId(String) derive(Compare, Eq, Hash,
    Debug
    )

    A source provider, for example finos/morphir-elm. A frontend from register_frontend uses its language name.
    impl Show for ProviderId

    ProviderId::compare

    fn ProviderId::compare(ProviderId, ProviderId) -> Int

    ProviderId::equal

    fn ProviderId::equal(ProviderId, ProviderId) -> Bool

    ProviderId::hash

    fn ProviderId::hash(self : ProviderId) -> Int

    ProviderId::hash_combine

    fn ProviderId::hash_combine(ProviderId, Hasher) -> Unit

    ProviderId::not_equal

    fn ProviderId::not_equal(x : ProviderId, y : ProviderId) -> Bool

    ProviderId::op_ge

    fn ProviderId::op_ge(x : ProviderId, y : ProviderId) -> Bool

    ProviderId::op_gt

    fn ProviderId::op_gt(x : ProviderId, y : ProviderId) -> Bool

    ProviderId::op_le

    fn ProviderId::op_le(x : ProviderId, y : ProviderId) -> Bool

    ProviderId::op_lt

    fn ProviderId::op_lt(x : ProviderId, y : ProviderId) -> Bool

    ProviderId::output

    fn ProviderId::output(self : ProviderId, logger : &Logger) -> Unit

    ProviderId::parse

    ProviderId::to_string

    fn ProviderId::to_string(self : ProviderId) -> String

    SourceModuleName

    pub struct SourceModuleName(String) derive(Compare, Eq, Hash,
    Debug
    )

    A module name in the source language's own syntax, as morphir.json writes it, for example Sub.Util.

    SourceModuleName::compare

    SourceModuleName::equal

    SourceModuleName::hash

    fn SourceModuleName::hash(self : SourceModuleName) -> Int

    SourceModuleName::hash_combine

    fn SourceModuleName::hash_combine(SourceModuleName, Hasher) -> Unit

    SourceModuleName::not_equal

    fn SourceModuleName::not_equal(x : SourceModuleName, y : SourceModuleName) -> Bool

    SourceModuleName::op_ge

    SourceModuleName::op_gt

    SourceModuleName::op_le

    SourceModuleName::op_lt

    SourceModuleName::output

    fn SourceModuleName::output(self : SourceModuleName, logger : &Logger) -> Unit

    SourceModuleName::parse

    SourceModuleName::to_string

    fn SourceModuleName::to_string(self : SourceModuleName) -> String

    SourcePackageName

    pub struct SourcePackageName {
    // private fields
    } derive(Compare, Eq, Hash,
    Debug
    )

    A package name as written in the project configuration, for example Parity.Modules. The source language matches module headers against this text; to_path gives the canonical Morphir path.

    SourcePackageName::compare

    SourcePackageName::equal

    SourcePackageName::hash

    fn SourcePackageName::hash(self : SourcePackageName) -> Int

    SourcePackageName::hash_combine

    fn SourcePackageName::hash_combine(SourcePackageName, Hasher) -> Unit

    SourcePackageName::not_equal

    fn SourcePackageName::not_equal(x : SourcePackageName, y : SourcePackageName) -> Bool

    SourcePackageName::op_ge

    SourcePackageName::op_gt

    SourcePackageName::op_le

    SourcePackageName::op_lt

    SourcePackageName::output

    fn SourcePackageName::output(self : SourcePackageName, logger : &Logger) -> Unit

    SourcePackageName::parse

    SourcePackageName::to_path

    The canonical Morphir path of the package, computed once by parse.

    SourcePackageName::to_string

    fn SourcePackageName::to_string(self : SourcePackageName) -> String

    SourcePath

    pub struct SourcePath(String) derive(Compare, Eq, Hash,
    Debug
    )

    A source file path relative to the source directory, with / separators, for example My/Pkg/Api.elm.
    impl Show for SourcePath

    SourcePath::compare

    fn SourcePath::compare(SourcePath, SourcePath) -> Int

    SourcePath::equal

    fn SourcePath::equal(SourcePath, SourcePath) -> Bool

    SourcePath::hash

    fn SourcePath::hash(self : SourcePath) -> Int

    SourcePath::hash_combine

    fn SourcePath::hash_combine(SourcePath, Hasher) -> Unit

    SourcePath::not_equal

    fn SourcePath::not_equal(x : SourcePath, y : SourcePath) -> Bool

    SourcePath::op_ge

    fn SourcePath::op_ge(x : SourcePath, y : SourcePath) -> Bool

    SourcePath::op_gt

    fn SourcePath::op_gt(x : SourcePath, y : SourcePath) -> Bool

    SourcePath::op_le

    fn SourcePath::op_le(x : SourcePath, y : SourcePath) -> Bool

    SourcePath::op_lt

    fn SourcePath::op_lt(x : SourcePath, y : SourcePath) -> Bool

    SourcePath::output

    fn SourcePath::output(self : SourcePath, logger : &Logger) -> Unit

    SourcePath::parse

    SourcePath::to_string

    fn SourcePath::to_string(self : SourcePath) -> String

    canonical_path

    fn canonical_path(text : String) -> String raise

    Project metadata and filenames use conventional spelling; IR uses canonical names. My.Pkg and my/pkg both give my/pkg.