The Elm frontend turns Elm source code into Morphir IR.
packageDefinitionFromSource : Options -> PackageInfo -> Dict Morphir.IR.Path.Path (Morphir.IR.Package.Specification ()) -> List SourceFile -> Result Errors (Morphir.IR.Package.Definition SourceLocation SourceLocation)
Function that takes some package info and a list of sources and returns Morphir IR or errors.
mapDeclarationsToType : SourceFile -> Elm.Syntax.Exposing.Exposing -> List Elm.Syntax.Declaration.Declaration -> Result Errors (List ( Morphir.IR.Name.Name, Morphir.IR.AccessControlled.AccessControlled (Morphir.IR.Documented.Documented (Morphir.IR.Type.Definition SourceLocation)) ))
Function that turns elm-syntax
declarations to Morphir IR types.
defaultDependencies : Dict Morphir.IR.Path.Path (Morphir.IR.Package.Specification ())
Dependencies that are added by default without explicit reference.
{ typesOnly : Basics.Bool }
Options that modify the behavior of the frontend:
- `typesOnly` - only include type information in the IR, no values
{ row : Basics.Int
, column : Basics.Int
}
{ start : ContentLocation
, end : ContentLocation
}
List Error
{ name : Morphir.IR.Path.Path
, exposedModules : Maybe (Set Morphir.IR.Path.Path)
}
{ path : String
, content : String
}
{ source : SourceFile
, range : ContentRange
}
mapSource : Options -> PackageInfo -> Dict Morphir.IR.Path.Path (Morphir.IR.Package.Specification ()) -> List SourceFile -> Result (List Morphir.Compiler.Error) (Morphir.IR.Package.Definition SourceLocation SourceLocation)
mapValueToFile : Morphir.IR.Distribution.Distribution -> Morphir.IR.Type.Type () -> String -> Result String Morphir.IR.Distribution.Distribution
parseRawValue : Morphir.IR.Distribution.Distribution -> String -> Result String Morphir.IR.Value.RawValue
Parses an expression written in the Elm syntax into a RawValue.