Skip to main content

morphir compile

  • Usage: morphir compile [FLAGS]

Compile source code to Morphir IR

Flags​

  • -l --language <LANGUAGE> — Source language (e.g., gleam, elm)

  • --extension <EXTENSION> — Extension id that provides the language (for example morphir-elm-native); overrides [frontend.<language>] extension, and defaults to the language's default provider

  • -i --input <INPUT>… — Source files or a directory. Files compile exactly those sources, named by the provider that declares their suffix; repeat the flag to select several from one directory. A directory replaces the project's source directory

  • -o --output <OUTPUT> — Install task outputs into this directory after the run. Canonical output stays under .morphir/out

  • --package-name <PACKAGE_NAME> — Package name override

  • --config <CONFIG> — Explicit config file path. An Elm command is a development override for the installed extension

  • --project <PROJECT> — Declared workspace-relative member path or exact project name

  • --ir-version <IR_VERSION> — IR version 3 or 4. Overrides ir.format_version in the selected project

  • --json — Output as JSON

  • --json-lines — Output as JSON Lines (streaming)

  • --no-cache — Ignore the incremental compile cache for this run

  • --types-only — Compile type declarations only, omitting value bodies

  • --elm-doc-comments <MODE> — How Elm doc comments become IR doc text. Overrides [frontend.elm] doc_comments and MORPHIR_FRONTEND__ELM__DOC_COMMENTS

    Choices: morphir-elm, trimmed

  • --elm-ordering <MODE> — The order Elm modules, types and constructors are written in. Overrides [frontend.elm] ordering and MORPHIR_FRONTEND__ELM__ORDERING

    Choices: source, morphir-elm