finos/morphir-elm/5.0.0

NOTE: the latest version is 22.0.2

Formerly Morgan-Stanley/morphir-elm. Search finds this package by either name.

Morphir.Elm.Frontend

The Elm frontend turns Elm source code into Morphir IR.

Entry points

PackageInfo
-> Dict Path (Specification ())
-> List SourceFile
-> Result Errors (Definition SourceLocation SourceLocation)

Function that takes some package info and a list of sources and returns Morphir IR or errors.

SourceFile
-> Exposing
-> List Declaration
-> Result
Errors
(List
( Name
, AccessControlled (Documented (Definition SourceLocation))
)
)

Function that turns elm-syntax declarations to Morphir IR types.

Utilities

defaultDependencies : Dict Path (Specification ())

Dependencies that are added by default without explicit reference.

type alias ContentLocation =
{ row : Int
, column : Int
}
type alias ContentRange =
{ start : ContentLocation
, end : ContentLocation
}
type Error
= ParseError String (List DeadEnd)
| CyclicModules (Graph () (List String))
| ResolveError SourceLocation Error
| EmptyApply SourceLocation
| NotSupported SourceLocation String
| DuplicateNameInPattern Name SourceLocation SourceLocation
| VariableShadowing Name SourceLocation SourceLocation
| MissingTypeSignature SourceLocation
| RecordPatternNotSupported SourceLocation
type alias Errors =
List Error
type alias PackageInfo =
{ name : Path
, exposedModules : Set Path
}
type alias SourceFile =
{ path : String
, content : String
}
type alias SourceLocation =
{ source : SourceFile
, range : ContentRange
}