This module is at the heart of the code generation process. This library works by gathering all the information necessary to build this type, then the code generator's job is to translate this type into an AST.
Represents a fully qualified name in Elm source code.
Represents an Elm type that has been fully resolved:
The constructors are:
GenericType "foo" refrepresents an unfilled type variablefooOpaque ref varsrepresents a custom type (or built in type)Function args returnrepresents a function typeTypeAliasRecord ref args definitionrepresents a record where we have a type alias (and therefore a constructor) availableAnonymouseRecord extensionVar definitionrepresents an anonymous recordCustomType ref args [(constructorRef, arguments)]represents a reference to an exposed (or accessible) custom typeTuple argsrepresents a tuple.Let's look at some simple examples and see how they would be represented:
Now for some more complex examples:
Note how in
Foo InttheIntvalue is replaced in the definition.