-
Notifications
You must be signed in to change notification settings - Fork 2
/
docs.txt
309 lines (309 loc) · 9.45 KB
/
docs.txt
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
[
{
"name": "Infer",
"comment": " This is the module implementing type inference. You'll also need at least `Infer.Expression`.\n@docs typeOf\n",
"aliases": [],
"types": [],
"values": [
{
"name": "typeOf",
"comment": " Returns a computation that yields the type of the input expression\nwith the specified environment.\n",
"type": "Infer.Scheme.Environment -> Infer.Expression.Expression -> Infer.Monad.Monad Infer.Type.Type"
}
],
"generated-with-elm-version": "0.18.0"
},
{
"name": "Infer.Scheme",
"comment": "\n@docs Scheme, substitute, freeVariables\n@docs Environment\n@docs freshTypevar, instantiate, generalize\n",
"aliases": [
{
"name": "Environment",
"comment": " Holds all names defined in outer scopes.\n",
"args": [],
"type": "Dict.Dict String Infer.Scheme.Scheme"
},
{
"name": "Scheme",
"comment": " A type scheme represents a variable definition, for example a named function.\nWhen the variable is used, the scheme must be converted into a concrete type.\nThe listed type variables are the ones that the type is generic over. It may\ncontain others that represent for example types of things defined higher up.\n",
"args": [],
"type": "( List Int, Infer.Type.Type )"
}
],
"types": [],
"values": [
{
"name": "freeVariables",
"comment": " Variables that are not bound by the type scheme.\n",
"type": "Infer.Scheme.Scheme -> Set.Set Int"
},
{
"name": "freshTypevar",
"comment": " Generates a type variable with the identifier one greater than the last.\n",
"type": "Infer.Monad.Monad Infer.Type.Type"
},
{
"name": "generalize",
"comment": " Converts a type into a type scheme that is generic over all the type variables\nin the type not coming from the environment.\n",
"type": "Infer.Scheme.Environment -> Infer.Type.Type -> Infer.Scheme.Scheme"
},
{
"name": "instantiate",
"comment": " Converts a scheme into a concrete type by swapping the generic type\nvariables for fresh ones.\n",
"type": "Infer.Scheme.Scheme -> Infer.Monad.Monad Infer.Type.Type"
},
{
"name": "substitute",
"comment": " Applies a substitution on a type scheme without touching the generic type vars\n",
"type": "Infer.Type.Substitution -> Infer.Scheme.Scheme -> Infer.Scheme.Scheme"
}
],
"generated-with-elm-version": "0.18.0"
},
{
"name": "Infer.Expression",
"comment": "\n@docs Expression\n",
"aliases": [],
"types": [
{
"name": "Expression",
"comment": " Translate your expressions to this type in order to be able to perform type inference on them.\n",
"args": [],
"cases": [
[
"Lambda",
[
"String",
"Infer.Expression.Expression"
]
],
[
"Call",
[
"Infer.Expression.Expression",
"Infer.Expression.Expression"
]
],
[
"Name",
[
"String"
]
],
[
"Literal",
[
"Infer.Type.Type"
]
],
[
"Let",
[
"String",
"Infer.Expression.Expression",
"Infer.Expression.Expression"
]
],
[
"If",
[
"Infer.Expression.Expression",
"Infer.Expression.Expression",
"Infer.Expression.Expression"
]
]
]
}
],
"values": [],
"generated-with-elm-version": "0.18.0"
},
{
"name": "Infer.Monad",
"comment": "\n# Construction\n@docs pure, Monad, fromResult\n\n# Mapping\n@docs andThen, map, map2, map3, map4, andMap\n\n# Combining\n@docs combine, finalValue\n",
"aliases": [
{
"name": "Monad",
"comment": " Represents a stateful computation that can fail.\n",
"args": [
"a"
],
"type": "State.State Int (Result.Result String a)"
}
],
"types": [],
"values": [
{
"name": "andMap",
"comment": " map over one more value. Arguments are reversed in order to work\nwell with `<|`.\n",
"type": "Infer.Monad.Monad y -> Infer.Monad.Monad (y -> z) -> Infer.Monad.Monad z"
},
{
"name": "andThen",
"comment": " `andThen` for this particular monad.\n",
"type": "(a -> Infer.Monad.Monad b) -> Infer.Monad.Monad a -> Infer.Monad.Monad b"
},
{
"name": "combine",
"comment": " Lifts the monads out of a list.\n",
"type": "List (Infer.Monad.Monad a) -> Infer.Monad.Monad (List a)"
},
{
"name": "finalValue",
"comment": " Computes the value of a computation.\n",
"type": "Int -> Infer.Monad.Monad a -> Result.Result String a"
},
{
"name": "fromResult",
"comment": " Un-specialize a Result.\n",
"type": "Result.Result String a -> Infer.Monad.Monad a"
},
{
"name": "map",
"comment": " `map` for this particular monad.\n",
"type": "(a -> value) -> Infer.Monad.Monad a -> Infer.Monad.Monad value"
},
{
"name": "map2",
"comment": " `map2` for this particular monad.\n",
"type": "(a -> b -> c) -> Infer.Monad.Monad a -> Infer.Monad.Monad b -> Infer.Monad.Monad c"
},
{
"name": "map3",
"comment": " `map3` for this particular monad.\n",
"type": "(a -> b -> c -> d) -> Infer.Monad.Monad a -> Infer.Monad.Monad b -> Infer.Monad.Monad c -> Infer.Monad.Monad d"
},
{
"name": "map4",
"comment": " `map4` for this particular monad.\n",
"type": "(a -> b -> c -> d -> e) -> Infer.Monad.Monad a -> Infer.Monad.Monad b -> Infer.Monad.Monad c -> Infer.Monad.Monad d -> Infer.Monad.Monad e"
},
{
"name": "pure",
"comment": " Put a value into the monad. Will not advance the fresh name supply nor cause an error.\n",
"type": "a -> Infer.Monad.Monad a"
}
],
"generated-with-elm-version": "0.18.0"
},
{
"name": "Infer.Type",
"comment": "\n@docs Type\n\n# Constructors for common primitive types\n@docs string, char, bool, int, float\n\n@docs toString\n\n@docs Substitution, substitute, ($)\n\n@docs unify, union\n\n@docs variables\n",
"aliases": [
{
"name": "Substitution",
"comment": "Tells what values type variables get.",
"args": [],
"type": "Dict.Dict Int Infer.Type.Type"
}
],
"types": [
{
"name": "Type",
"comment": " Represents Elm types. TAny is for type variables.\n",
"args": [],
"cases": [
[
"TArrow",
[
"Infer.Type.Type",
"Infer.Type.Type"
]
],
[
"TRecord",
[
"Dict.Dict String Infer.Type.Type"
]
],
[
"TUnion",
[
"String",
"Dict.Dict String (List Infer.Type.Type)"
]
],
[
"TTuple",
[
"List Infer.Type.Type"
]
],
[
"TOpaque",
[
"String",
"List Infer.Type.Type"
]
],
[
"TAny",
[
"Int"
]
]
]
}
],
"values": [
{
"name": "$",
"comment": "Applies one substitution to another",
"type": "Infer.Type.Substitution -> Infer.Type.Substitution -> Infer.Type.Substitution",
"associativity": "left",
"precedence": 9
},
{
"name": "bool",
"comment": "Bool",
"type": "Infer.Type.Type"
},
{
"name": "char",
"comment": "Char",
"type": "Infer.Type.Type"
},
{
"name": "float",
"comment": "Float",
"type": "Infer.Type.Type"
},
{
"name": "int",
"comment": "Int",
"type": "Infer.Type.Type"
},
{
"name": "string",
"comment": "String",
"type": "Infer.Type.Type"
},
{
"name": "substitute",
"comment": "Swap out type variables according to substitution",
"type": "Infer.Type.Substitution -> Infer.Type.Type -> Infer.Type.Type"
},
{
"name": "toString",
"comment": "Textual representation of a type",
"type": "Infer.Type.Type -> String"
},
{
"name": "unify",
"comment": "\n Returns the substitutions necessary to transform either type\n into their lowest common denominator.\n Returns an error if not possible.\n",
"type": "Infer.Type.Type -> Infer.Type.Type -> Result.Result String Infer.Type.Substitution"
},
{
"name": "union",
"comment": "Returns a type that conforms to both supplied types",
"type": "Infer.Type.Type -> Infer.Type.Type -> Result.Result String Infer.Type.Type"
},
{
"name": "variables",
"comment": "Returns the (free) type variables of the type.",
"type": "Infer.Type.Type -> Set.Set Int"
}
],
"generated-with-elm-version": "0.18.0"
}
]