1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
module MyElm.Types exposing (Argument(..), Declaration(..), Exposing(..), Expression(..), Ident(..), Module(..), QualifiedName(..), Type(..))
type Module
= Module
{ name : String
, exposes : List Exposing
, doc : Maybe String
, imports : List String
, declarations : List Declaration
}
type QualifiedName
= Local Ident
| FullyQualified (List String) Ident
| Aliased (List String) String Ident
| Bare (List String) Ident
type Ident
= Constructor String String
| ValueOrType String
type Exposing
= ValueExposed String
| TypeExposed String
| TypeAndConstructors String
type Type
= NamedType QualifiedName (List Type)
| RecordType (List ( String, Type ))
| FunctionType (List Type)
| TupleType (List Type)
| TypeVariable String
type Declaration
= CustomType String (List String) (List ( String, List Type ))
| TypeAlias String (List String) Type
| ValueDeclaration String (List Type) (List Argument) Expression
| Comment String
type Expression
= Call QualifiedName (List Expression)
| Literal String
| ListExpr (List Expression)
| Tuple (List Expression)
| Record (List ( String, Expression ))
type Argument
= Argument String
|