Sign in

    PaiGack/moon_shadow/core does not have a README file

    Dependency

    pub(all) struct Dependency {
    name : String
    version : String
    } derive(Eq,
    Debug
    )

    One entry of import { ... } in moon.mod, name and version split apart.

    Dependency::equal

    #deprecated("`Dependency::equal` is deprecated, use `Eq::equal` instead.")
    fn Dependency::equal(Dependency, Dependency) -> Bool

    Dependency::not_equal

    #deprecated("`Dependency::not_equal` is deprecated, use `Eq::not_equal` instead.")
    fn Dependency::not_equal(x : Dependency, y : Dependency) -> Bool

    Dependency::to_repr

    #deprecated("`Dependency::to_repr` is deprecated, use `@moonbitlang/core/debug.Debug::to_repr` instead.")
    fn Dependency::to_repr(Dependency) ->
    Repr

    ModuleInfo

    pub(all) struct ModuleInfo {
    name : String
    version : String
    description : String
    license : String
    repository : String
    readme : String
    keywords : Array[String]
    preferred_target : String
    supported_targets : Array[String]
    deps : Array[Dependency]
    } derive(Eq,
    Debug
    )

    A snapshot of moon.mod, rendered into the artifact at build time.

    ModuleInfo::dep

    fn ModuleInfo::dep(self : ModuleInfo, name : String) -> Dependency?

    Look a dependency up by module name.

    ModuleInfo::empty

    fn ModuleInfo::empty() -> ModuleInfo

    ModuleInfo::equal

    #deprecated("`ModuleInfo::equal` is deprecated, use `Eq::equal` instead.")
    fn ModuleInfo::equal(ModuleInfo, ModuleInfo) -> Bool

    ModuleInfo::long_version

    fn ModuleInfo::long_version(self : ModuleInfo) -> String

    <name>@<version>, the shape moon add accepts.

    ModuleInfo::not_equal

    #deprecated("`ModuleInfo::not_equal` is deprecated, use `Eq::not_equal` instead.")
    fn ModuleInfo::not_equal(x : ModuleInfo, y : ModuleInfo) -> Bool

    ModuleInfo::to_long_version_string

    fn ModuleInfo::to_long_version_string(self : ModuleInfo) -> String

    <name> <version> (<short info>), the shape used by --version output.

    ModuleInfo::to_repr

    #deprecated("`ModuleInfo::to_repr` is deprecated, use `@moonbitlang/core/debug.Debug::to_repr` instead.")
    fn ModuleInfo::to_repr(ModuleInfo) ->
    Repr

    ParsedMoonMod

    pub(all) struct ParsedMoonMod {
    info : ModuleInfo
    errors : Array[String]
    }

    Result of reading a moon.mod: the metadata plus whatever moon_config complained about, left for the caller to report.

    parse_moon_mod

    fn parse_moon_mod(name? : String, source : String) -> ParsedMoonMod

    Parse moon.mod source into ModuleInfo.

    The DSL is moonbitlang/moon_config's job, including the diagnostics for duplicate and unknown keys; nothing here re-implements it.

    render_module_info

    fn render_module_info(info : ModuleInfo) -> String

    Render the implementation that dev_build writes into a virtual package implementation: a module_info() accessor returning @core.ModuleInfo.

    It is a function rather than a let on purpose: moon type-checks a virtual package's implementations against its pkg.mbti, and only function signatures in the pkg.mbti form survive that check for a type coming from another package.

    unescape

    fn unescape(raw : String) -> String

    Resolve the escape sequences of a moon.mod string literal.

    moon_config hands back the literal's raw source text ("a \"b\"" becomes a \"b\"), so a value that is about to be re-emitted as MoonBit source has to be decoded first; otherwise every round trip doubles the backslashes. Unknown escapes are kept verbatim.

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io