A data structure representing the Elm types.
Note: This module is not named Elm.Type because that already exists in elm/project-metadata-utils.
Display a type.
toString (Function { from = Int, to = TypeVar "a" })
--> "Int -> a"Display a type, breaking it to new lines when the full type is longer than
maxWidth chars.
Short types stay on one line:
a -> bLong -> chains break one arrow per line:
Foo bar baz
-> Foo bar baz
-> Foo bar bazLong records break one field per line:
{ a : Int
, b : String
}Convert a Type to an elm-syntax TypeAnnotation.
All Nodes use dummy ranges.
Eg. "elm/core".
Comes from elm.json dependency keys.
Empty string for the user's project.
Eg. "foobar" in \foobar -> foobar + 1.
The inferred type.