Typed AST holds the inferred types for every expression.
{ modules : Dict Elm.Data.ModuleName.ModuleName (Elm.Data.Module.Module LocatedExpr) }
"What does this compiler stage need to store abotut the whole project?
(See Elm.Data.Project
.)
In this case, a dict of all the compiled Elm modules that hold typed AST expressions.
Elm.Data.Located.Located Expr
The main type of this module. Expression with location metadata.
Note the underlying Expr
custom type recurses on this LocatedExpr
type,
so that the children also each have their location metadata.
If you want expressions without location metadata, look at unwrap
.
( Expr_
, Elm.Data.Type.Type
)
Differs from Canonical.Expr by:
getExpr : LocatedExpr -> Expr_
Extract the expression (remove the location and type information).
getType : LocatedExpr -> Elm.Data.Type.Type
Extract the type (remove the location information and the expression).
unwrap : LocatedExpr -> Unwrapped.Expr
Discard the location metadata.
dropTypes : LocatedExpr -> Elm.AST.Canonical.LocatedExpr
Go from AST.Typed
to AST.Canonical
.
transformAll : List (LocatedExpr -> Maybe LocatedExpr) -> LocatedExpr -> LocatedExpr
Transform the expression using the provided function. Start at the children, repeatedly apply on them until they stop changing, then go up.
transformOnce : (LocatedExpr -> LocatedExpr) -> LocatedExpr -> LocatedExpr
Transform the expression once using the provided function. Start at the children, apply once then go up.
recursiveChildren : (LocatedExpr -> List LocatedExpr) -> LocatedExpr -> List LocatedExpr
Find all the children of this expression (and their children, etc...)
setExpr : Expr_ -> LocatedExpr -> LocatedExpr
Replace the existing expression with the provided one.