git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Update Prelude doc
commite05d5679a588571cfe41c9fabbd316991cfcfe98 authorPhil Freeman <paf31@cantab.net> dateTue 10 Feb 2015, 13:42 (12 years ago) parent94f7832
1 file changed+136−33
prelude/README.md+136−33
prelude/README.md+136−33
@@ -4,279 +4,321 @@
44
55### Types
66
7+#### `Ordering`
78
8− data Ordering where
9− LT :: Ordering
10− GT :: Ordering
11− EQ :: Ordering
9+ data Ordering
10+ = LT
11+ | GT
12+ | EQ
1213
14+#### `Unit`
1315
14− newtype Unit where
15− Unit :: { } -> Unit
16+ newtype Unit
17+ = Unit { }
1618
1719
1820### Type Classes
1921
2022![Prelude](images/Prelude.png)
2123
24+#### `Applicative`
2225
2326 class (Apply f) <= Applicative f where
24−
2527 pure :: forall a. a -> f a
2628
29+#### `Apply`
2730
2831 class (Functor f) <= Apply f where
29−
3032 (<*>) :: forall a b. f (a -> b) -> f a -> f b
3133
34+#### `Bind`
3235
3336 class (Apply m) <= Bind m where
34−
3537 (>>=) :: forall a b. m a -> (a -> m b) -> m b
3638
39+#### `Bits`
3740
3841 class Bits b where
39−
4042 (.&.) :: b -> b -> b
41−
4243 (.|.) :: b -> b -> b
43−
4444 (.^.) :: b -> b -> b
45−
4645 shl :: b -> Number -> b
47−
4846 shr :: b -> Number -> b
49−
5047 zshr :: b -> Number -> b
51−
5248 complement :: b -> b
5349
50+#### `BoolLike`
5451
5552 class BoolLike b where
56−
5753 (&&) :: b -> b -> b
58−
5954 (||) :: b -> b -> b
60−
6155 not :: b -> b
6256
57+#### `Category`
6358
6459 class (Semigroupoid a) <= Category a where
65−
6660 id :: forall t. a t t
6761
62+#### `Eq`
6863
6964 class Eq a where
70−
7165 (==) :: a -> a -> Boolean
72−
7366 (/=) :: a -> a -> Boolean
7467
68+#### `Functor`
7569
7670 class Functor f where
77−
7871 (<$>) :: forall a b. (a -> b) -> f a -> f b
7972
73+#### `Monad`
8074
8175 class (Applicative m, Bind m) <= Monad m where
8276
77+#### `Num`
8378
8479 class Num a where
85−
8680 (+) :: a -> a -> a
87−
8881 (-) :: a -> a -> a
89−
9082 (*) :: a -> a -> a
91−
9283 (/) :: a -> a -> a
93−
9484 (%) :: a -> a -> a
95−
9685 negate :: a -> a
9786
87+#### `Ord`
9888
9989 class (Eq a) <= Ord a where
100−
10190 compare :: a -> a -> Ordering
10291
92+#### `Semigroup`
10393
10494 class Semigroup a where
105−
10695 (<>) :: a -> a -> a
10796
97+#### `Semigroupoid`
10898
10999 class Semigroupoid a where
110−
111100 (<<<) :: forall b c d. a c d -> a b c -> a b d
112101
102+#### `Show`
113103
114104 class Show a where
115−
116105 show :: a -> String
117106
118107
119108### Type Class Instances
120109
110+#### `applicativeArr`
121111
122112 instance applicativeArr :: Applicative (Prim.Function r)
123113
114+#### `applyArr`
124115
125116 instance applyArr :: Apply (Prim.Function r)
126117
118+#### `bindArr`
127119
128120 instance bindArr :: Bind (Prim.Function r)
129121
122+#### `bitsNumber`
130123
131124 instance bitsNumber :: Bits Number
132125
126+#### `boolLikeBoolean`
133127
134128 instance boolLikeBoolean :: BoolLike Boolean
135129
130+#### `categoryArr`
136131
137132 instance categoryArr :: Category Prim.Function
138133
134+#### `eqArray`
139135
140136 instance eqArray :: (Eq a) => Eq [a]
141137
138+#### `eqBoolean`
142139
143140 instance eqBoolean :: Eq Boolean
144141
142+#### `eqNumber`
145143
146144 instance eqNumber :: Eq Number
147145
146+#### `eqOrdering`
148147
149148 instance eqOrdering :: Eq Ordering
150149
150+#### `eqString`
151151
152152 instance eqString :: Eq String
153153
154+#### `eqUnit`
154155
155156 instance eqUnit :: Eq Unit
156157
158+#### `functorArr`
157159
158160 instance functorArr :: Functor (Prim.Function r)
159161
162+#### `monadArr`
160163
161164 instance monadArr :: Monad (Prim.Function r)
162165
166+#### `numNumber`
163167
164168 instance numNumber :: Num Number
165169
170+#### `ordArray`
166171
167172 instance ordArray :: (Ord a) => Ord [a]
168173
174+#### `ordBoolean`
169175
170176 instance ordBoolean :: Ord Boolean
171177
178+#### `ordNumber`
172179
173180 instance ordNumber :: Ord Number
174181
182+#### `ordString`
175183
176184 instance ordString :: Ord String
177185
186+#### `ordUnit`
178187
179188 instance ordUnit :: Ord Unit
180189
190+#### `semigroupArr`
181191
182192 instance semigroupArr :: (Semigroup s') => Semigroup (s -> s')
183193
194+#### `semigroupString`
184195
185196 instance semigroupString :: Semigroup String
186197
198+#### `semigroupUnit`
187199
188200 instance semigroupUnit :: Semigroup Unit
189201
202+#### `semigroupoidArr`
190203
191204 instance semigroupoidArr :: Semigroupoid Prim.Function
192205
206+#### `showArray`
193207
194208 instance showArray :: (Show a) => Show [a]
195209
210+#### `showBoolean`
196211
197212 instance showBoolean :: Show Boolean
198213
214+#### `showNumber`
199215
200216 instance showNumber :: Show Number
201217
218+#### `showOrdering`
202219
203220 instance showOrdering :: Show Ordering
204221
222+#### `showString`
205223
206224 instance showString :: Show String
207225
226+#### `showUnit`
208227
209228 instance showUnit :: Show Unit
210229
211230
212231### Values
213232
233+#### `(#)`
214234
215235 (#) :: forall a b. a -> (a -> b) -> b
216236
237+#### `($)`
217238
218239 ($) :: forall a b. (a -> b) -> a -> b
219240
241+#### `(++)`
220242
221243 (++) :: forall s. (Semigroup s) => s -> s -> s
222244
245+#### `(:)`
223246
224247 (:) :: forall a. a -> [a] -> [a]
225248
249+#### `(<#>)`
226250
227251 (<#>) :: forall f a b. (Functor f) => f a -> (a -> b) -> f b
228252
253+#### `(<)`
229254
230255 (<) :: forall a. (Ord a) => a -> a -> Boolean
231256
257+#### `(<=)`
232258
233259 (<=) :: forall a. (Ord a) => a -> a -> Boolean
234260
261+#### `(>)`
235262
236263 (>) :: forall a. (Ord a) => a -> a -> Boolean
237264
265+#### `(>=)`
238266
239267 (>=) :: forall a. (Ord a) => a -> a -> Boolean
240268
269+#### `(>>>)`
241270
242271 (>>>) :: forall a b c d. (Semigroupoid a) => a b c -> a c d -> a b d
243272
273+#### `ap`
244274
245275 ap :: forall m a b. (Monad m) => m (a -> b) -> m a -> m b
246276
277+#### `asTypeOf`
247278
248279 asTypeOf :: forall a. a -> a -> a
249280
281+#### `cons`
250282
251283 cons :: forall a. a -> [a] -> [a]
252284
285+#### `const`
253286
254287 const :: forall a b. a -> b -> a
255288
289+#### `flip`
256290
257291 flip :: forall a b c. (a -> b -> c) -> b -> a -> c
258292
293+#### `liftA1`
259294
260295 liftA1 :: forall f a b. (Applicative f) => (a -> b) -> f a -> f b
261296
297+#### `liftM1`
262298
263299 liftM1 :: forall m a b. (Monad m) => (a -> b) -> m a -> m b
264300
301+#### `otherwise`
265302
266303 otherwise :: Boolean
267304
305+#### `refEq`
268306
269307 refEq :: forall a. a -> a -> Boolean
270308
309+#### `refIneq`
271310
272311 refIneq :: forall a. a -> a -> Boolean
273312
313+#### `return`
274314
275315 return :: forall m a. (Monad m) => a -> m a
276316
317+#### `unit`
277318
278319 unit :: Unit
279320
321+#### `void`
280322
281323 void :: forall f a. (Functor f) => f a -> f Unit
282324
@@ -285,108 +327,142 @@
285327
286328### Types
287329
330+#### `Fn0`
288331
289332 data Fn0 :: * -> *
290333
334+#### `Fn1`
291335
292336 data Fn1 :: * -> * -> *
293337
338+#### `Fn10`
294339
295340 data Fn10 :: * -> * -> * -> * -> * -> * -> * -> * -> * -> * -> * -> *
296341
342+#### `Fn2`
297343
298344 data Fn2 :: * -> * -> * -> *
299345
346+#### `Fn3`
300347
301348 data Fn3 :: * -> * -> * -> * -> *
302349
350+#### `Fn4`
303351
304352 data Fn4 :: * -> * -> * -> * -> * -> *
305353
354+#### `Fn5`
306355
307356 data Fn5 :: * -> * -> * -> * -> * -> * -> *
308357
358+#### `Fn6`
309359
310360 data Fn6 :: * -> * -> * -> * -> * -> * -> * -> *
311361
362+#### `Fn7`
312363
313364 data Fn7 :: * -> * -> * -> * -> * -> * -> * -> * -> *
314365
366+#### `Fn8`
315367
316368 data Fn8 :: * -> * -> * -> * -> * -> * -> * -> * -> * -> *
317369
370+#### `Fn9`
318371
319372 data Fn9 :: * -> * -> * -> * -> * -> * -> * -> * -> * -> * -> *
320373
321374
322375### Values
323376
377+#### `mkFn0`
324378
325379 mkFn0 :: forall a. (Unit -> a) -> Fn0 a
326380
381+#### `mkFn1`
327382
328383 mkFn1 :: forall a b. (a -> b) -> Fn1 a b
329384
385+#### `mkFn10`
330386
331387 mkFn10 :: forall a b c d e f g h i j k. (a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k) -> Fn10 a b c d e f g h i j k
332388
389+#### `mkFn2`
333390
334391 mkFn2 :: forall a b c. (a -> b -> c) -> Fn2 a b c
335392
393+#### `mkFn3`
336394
337395 mkFn3 :: forall a b c d. (a -> b -> c -> d) -> Fn3 a b c d
338396
397+#### `mkFn4`
339398
340399 mkFn4 :: forall a b c d e. (a -> b -> c -> d -> e) -> Fn4 a b c d e
341400
401+#### `mkFn5`
342402
343403 mkFn5 :: forall a b c d e f. (a -> b -> c -> d -> e -> f) -> Fn5 a b c d e f
344404
405+#### `mkFn6`
345406
346407 mkFn6 :: forall a b c d e f g. (a -> b -> c -> d -> e -> f -> g) -> Fn6 a b c d e f g
347408
409+#### `mkFn7`
348410
349411 mkFn7 :: forall a b c d e f g h. (a -> b -> c -> d -> e -> f -> g -> h) -> Fn7 a b c d e f g h
350412
413+#### `mkFn8`
351414
352415 mkFn8 :: forall a b c d e f g h i. (a -> b -> c -> d -> e -> f -> g -> h -> i) -> Fn8 a b c d e f g h i
353416
417+#### `mkFn9`
354418
355419 mkFn9 :: forall a b c d e f g h i j. (a -> b -> c -> d -> e -> f -> g -> h -> i -> j) -> Fn9 a b c d e f g h i j
356420
421+#### `on`
357422
358423 on :: forall a b c. (b -> b -> c) -> (a -> b) -> a -> a -> c
359424
425+#### `runFn0`
360426
361427 runFn0 :: forall a. Fn0 a -> a
362428
429+#### `runFn1`
363430
364431 runFn1 :: forall a b. Fn1 a b -> a -> b
365432
433+#### `runFn10`
366434
367435 runFn10 :: forall a b c d e f g h i j k. Fn10 a b c d e f g h i j k -> a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k
368436
437+#### `runFn2`
369438
370439 runFn2 :: forall a b c. Fn2 a b c -> a -> b -> c
371440
441+#### `runFn3`
372442
373443 runFn3 :: forall a b c d. Fn3 a b c d -> a -> b -> c -> d
374444
445+#### `runFn4`
375446
376447 runFn4 :: forall a b c d e. Fn4 a b c d e -> a -> b -> c -> d -> e
377448
449+#### `runFn5`
378450
379451 runFn5 :: forall a b c d e f. Fn5 a b c d e f -> a -> b -> c -> d -> e -> f
380452
453+#### `runFn6`
381454
382455 runFn6 :: forall a b c d e f g. Fn6 a b c d e f g -> a -> b -> c -> d -> e -> f -> g
383456
457+#### `runFn7`
384458
385459 runFn7 :: forall a b c d e f g h. Fn7 a b c d e f g h -> a -> b -> c -> d -> e -> f -> g -> h
386460
461+#### `runFn8`
387462
388463 runFn8 :: forall a b c d e f g h i. Fn8 a b c d e f g h i -> a -> b -> c -> d -> e -> f -> g -> h -> i
389464
465+#### `runFn9`
390466
391467 runFn9 :: forall a b c d e f g h i j. Fn9 a b c d e f g h i j -> a -> b -> c -> d -> e -> f -> g -> h -> i -> j
392468
@@ -395,6 +471,7 @@
395471
396472### Values
397473
474+#### `unsafeIndex`
398475
399476 unsafeIndex :: forall a. [a] -> Number -> a
400477
@@ -403,51 +480,65 @@
403480
404481### Types
405482
483+#### `Eff`
406484
407485 data Eff :: # ! -> * -> *
408486
487+#### `Pure`
409488
410489 type Pure a = forall e. Eff e a
411490
412491
413492### Type Class Instances
414493
494+#### `applicativeEff`
415495
416496 instance applicativeEff :: Applicative (Eff e)
417497
498+#### `applyEff`
418499
419500 instance applyEff :: Apply (Eff e)
420501
502+#### `bindEff`
421503
422504 instance bindEff :: Bind (Eff e)
423505
506+#### `functorEff`
424507
425508 instance functorEff :: Functor (Eff e)
426509
510+#### `monadEff`
427511
428512 instance monadEff :: Monad (Eff e)
429513
430514
431515### Values
432516
517+#### `bindE`
433518
434519 bindE :: forall e a b. Eff e a -> (a -> Eff e b) -> Eff e b
435520
521+#### `forE`
436522
437523 forE :: forall e. Number -> Number -> (Number -> Eff e Unit) -> Eff e Unit
438524
525+#### `foreachE`
439526
440527 foreachE :: forall e a. [a] -> (a -> Eff e Unit) -> Eff e Unit
441528
529+#### `returnE`
442530
443531 returnE :: forall e a. a -> Eff e a
444532
533+#### `runPure`
445534
446535 runPure :: forall a. Pure a -> a
447536
537+#### `untilE`
448538
449539 untilE :: forall e. Eff e Boolean -> Eff e Unit
450540
541+#### `whileE`
451542
452543 whileE :: forall e a. Eff e Boolean -> Eff e a -> Eff e Unit
453544
@@ -456,6 +547,7 @@
456547
457548### Values
458549
550+#### `unsafeInterleaveEff`
459551
460552 unsafeInterleaveEff :: forall eff1 eff2 a. Eff eff1 a -> Eff eff2 a
461553
@@ -464,15 +556,18 @@
464556
465557### Types
466558
559+#### `Trace`
467560
468561 data Trace :: !
469562
470563
471564### Values
472565
566+#### `print`
473567
474568 print :: forall a r. (Show a) => a -> Eff (trace :: Trace | r) Unit
475569
570+#### `trace`
476571
477572 trace :: forall r. String -> Eff (trace :: Trace | r) Unit
478573
@@ -481,30 +576,38 @@
481576
482577### Types
483578
579+#### `ST`
484580
485581 data ST :: * -> !
486582
583+#### `STRef`
487584
488585 data STRef :: * -> * -> *
489586
490587
491588### Values
492589
590+#### `modifySTRef`
493591
494592 modifySTRef :: forall a h r. STRef h a -> (a -> a) -> Eff (st :: ST h | r) a
495593
594+#### `newSTRef`
496595
497596 newSTRef :: forall a h r. a -> Eff (st :: ST h | r) (STRef h a)
498597
598+#### `pureST`
499599
500600 pureST :: forall a. (forall h r. Eff (st :: ST h | r) a) -> a
501601
602+#### `readSTRef`
502603
503604 readSTRef :: forall a h r. STRef h a -> Eff (st :: ST h | r) a
504605
606+#### `runST`
505607
506608 runST :: forall a r. (forall h. Eff (st :: ST h | r) a) -> Eff r a
507609
610+#### `writeSTRef`
508611
509612 writeSTRef :: forall a h r. STRef h a -> a -> Eff (st :: ST h | r) a
510613