elm-in-elm/compiler/1.0.0

NOTE: the latest version is 1.0.1

Elm.Data.Type

A data structure representing the Elm types.

type Type
= Var Int
| Function Type Type
| Int
| Float
| Char
| String
| Bool
| List Type
| Unit
| Tuple Type Type
| Tuple3 Type Type Type
| UserDefinedType
{ module_ : String
, name : String
}
(List Type)
= ConcreteType Type
| TypeVariable VarName

Type argument of a polymorphic type.

Maybe Int
--> ConcreteType Int


Maybe a
--> TypeVariable "a"
isParametric : Type -> Bool

Does it contain lower-case type parameters?

varId : Type -> Maybe Int

Unwrap the ID of the type variable