1{-# OPTIONS_GHC -Wall #-}
2{-# LANGUAGE OverloadedStrings #-}
3module AST.Expression.Source
7 , Pattern, Pattern_(..)
20import qualified Data.ByteString as B
21import Data.Text (Text)
23import qualified AST.Binop as Binop
24import qualified AST.Literal as Literal
25import qualified AST.Type as Type
26import qualified Elm.Name as N
27import qualified Reporting.Annotation as A
28import qualified Reporting.Region as R
35type Expr = A.Located Expr_
39 = Literal Literal.Literal
40 | Var (Maybe N.Name) N.Name
44 | Binops [(Expr, A.Located N.Name)] Expr
45 | Lambda [Pattern] Expr
47 | If [(Expr, Expr)] Expr
48 | Let [A.Located Def] Expr
49 | Case Expr [(Pattern, Expr)]
52 | Update (A.Located N.Name) [(A.Located N.Name, Expr)]
53 | Record [(A.Located N.Name, Expr)]
55 | Tuple Expr Expr [Expr]
56 | GLShader Text Text Literal.Shader
64 = Annotate N.Name Type.Raw
65 | Define (A.Located N.Name) [Pattern] Expr
66 | Destruct Pattern Expr
73type Pattern = A.Located Pattern_
79 | PRecord [A.Located N.Name]
80 | PAlias Pattern (A.Located N.Name)
82 | PTuple Pattern Pattern [Pattern]
83 | PCtor R.Region (Maybe N.Name) N.Name [Pattern]
85 | PCons Pattern Pattern
86 | PLiteral Literal.Literal
93type Decl = A.Located Decl_
97 = Union (A.Located N.Name) [A.Located N.Name] [(A.Located N.Name, [Type.Raw])]
98 | Alias (A.Located N.Name) [A.Located N.Name] Type.Raw
99 | Binop (A.Located N.Name) Binop.Associativity Binop.Precedence N.Name
100 | Port (A.Located N.Name) Type.Raw
102 | Annotation (A.Located N.Name) Type.Raw
103 | Definition (A.Located N.Name) [Pattern] Expr
113 , _effects :: Effects
114 , _docs :: A.Located (Maybe B.ByteString)
115 , _exports :: Exposing
116 , _imports :: [Import]
123 { _import :: A.Located N.Name
124 , _alias :: Maybe N.Name
125 , _exposing :: Exposing
132 | Effects R.Region Manager
136 = Cmd (A.Located N.Name)
137 | Sub (A.Located N.Name)
138 | Fx (A.Located N.Name) (A.Located N.Name)
141defaultModule :: [Import] -> decls -> Module decls
142defaultModule imports decls =
143 let zero = R.Position 1 1 in
146 , _effects = NoEffects
147 , _docs = A.at zero zero Nothing
160 | Explicit ![A.Located Exposed]
165 | Upper !N.Name !Privacy
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list