git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Update docs
commit0952561bf3507966cda8b35d412bab5f798d2941 authorGary Burgess <gary.burgess@gmail.com> dateFri 21 Feb 2014, 22:11 (13 years ago) parent8a6e5cf
2 files changed+213−83
docs/source/prelude.rst+116−48 prelude/README.md+97−35
docs/source/prelude.rst+116−48
@@ -139,6 +139,8 @@ Values
139139
140140 flip :: forall c. forall b. forall a. (a -> b -> c) -> b -> a -> c
141141
142+ liftRef :: forall b. forall a. (a -> a -> b) -> Ref a -> Ref a -> b
143+
142144 numAdd :: Prim.Number -> Prim.Number -> Prim.Number
143145
144146 numAnd :: Prim.Number -> Prim.Number -> Prim.Number
@@ -185,8 +187,8 @@ Values
185187
186188 unsafeRefIneq :: forall a. a -> a -> Prim.Boolean
187189
188−Module Monoid
189−-------------
190+Module Data.Monoid
191+------------------
190192
191193Types
192194~~~~~
@@ -216,8 +218,8 @@ Values
216218
217219 mconcat :: forall m. (Monoid (m)) => [m] -> m
218220
219−Module Monad
220−------------
221+Module Control.Monad
222+--------------------
221223
222224Types
223225~~~~~
@@ -249,8 +251,8 @@ Values
249251
250252 when :: forall m. (Monad (m)) => Prim.Boolean -> m { } -> m { }
251253
252−Module Maybe
253−------------
254+Module Data.Maybe
255+-----------------
254256
255257Types
256258~~~~~
@@ -286,8 +288,8 @@ Values
286288
287289 maybe :: forall b. forall a. b -> (a -> b) -> Maybe a -> b
288290
289−Module Either
290−-------------
291+Module Data.Either
292+------------------
291293
292294Types
293295~~~~~
@@ -321,8 +323,8 @@ Values
321323
322324 either :: forall c. forall b. forall a. (a -> c) -> (b -> c) -> Either a b -> c
323325
324−Module Arrays
325−-------------
326+Module Data.Array
327+-----------------
326328
327329Types
328330~~~~~
@@ -360,13 +362,13 @@ Values
360362
361363 filter :: forall a. (a -> Prim.Boolean) -> [a] -> [a]
362364
365+ find :: forall a. (a -> Prim.Boolean) -> [a] -> Maybe a
366+
363367 foldl :: forall b. forall a. (a -> b -> b) -> b -> [a] -> b
364368
365369 foldr :: forall b. forall a. (a -> b -> a) -> a -> [b] -> a
366370
367− head :: forall a. [a] -> a
368−
369− headSafe :: forall a. [a] -> Maybe a
371+ head :: forall a. [a] -> Maybe a
370372
371373 indexOf :: forall a. [a] -> a -> Prim.Number
372374
@@ -398,14 +400,33 @@ Values
398400
399401 splice :: forall a. Prim.Number -> Prim.Number -> [a] -> [a] -> [a]
400402
401− tail :: forall a. [a] -> [a]
402−
403− tailSafe :: forall a. [a] -> Maybe [a]
403+ tail :: forall a. [a] -> Maybe [a]
404404
405405 zipWith :: forall c. forall b. forall a. (a -> b -> c) -> [a] -> [b] -> [c]
406406
407−Module Tuples
408−-------------
407+Module Data.Array.Unsafe
408+------------------------
409+
410+Types
411+~~~~~
412+
413+Type Classes
414+~~~~~~~~~~~~
415+
416+Type Class Instances
417+~~~~~~~~~~~~~~~~~~~~
418+
419+Values
420+~~~~~~
421+
422+::
423+
424+ head :: forall a. [a] -> a
425+
426+ tail :: forall a. [a] -> [a]
427+
428+Module Data.Tuple
429+-----------------
409430
410431Types
411432~~~~~
@@ -438,8 +459,8 @@ Values
438459
439460 zip :: forall b. forall a. [a] -> [b] -> [Tuple a b]
440461
441−Module String
442−-------------
462+Module Data.String
463+------------------
443464
444465Types
445466~~~~~
@@ -481,8 +502,8 @@ Values
481502
482503 trim :: Prim.String -> Prim.String
483504
484−Module Regex
485−------------
505+Module Data.String.Regex
506+------------------------
486507
487508Types
488509~~~~~
@@ -586,16 +607,28 @@ Values
586607
587608 cos :: Prim.Number -> Prim.Number
588609
610+ e :: Prim.Number
611+
589612 exp :: Prim.Number -> Prim.Number
590613
591614 floor :: Prim.Number -> Prim.Number
592615
616+ ln10 :: Prim.Number
617+
618+ ln2 :: Prim.Number
619+
593620 log :: Prim.Number -> Prim.Number
594621
622+ log10e :: Prim.Number
623+
624+ log2e :: Prim.Number
625+
595626 max :: Prim.Number -> Prim.Number
596627
597628 min :: Prim.Number -> Prim.Number
598629
630+ pi :: Prim.Number
631+
599632 pow :: Prim.Number -> Prim.Number
600633
601634 round :: Prim.Number -> Prim.Number
@@ -604,10 +637,14 @@ Values
604637
605638 sqrt :: Prim.Number -> Prim.Number
606639
640+ sqrt1_2 :: Prim.Number
641+
642+ sqrt2 :: Prim.Number
643+
607644 tan :: Prim.Number -> Prim.Number
608645
609−Module Eff
610−----------
646+Module Control.Monad.Eff
647+------------------------
611648
612649Types
613650~~~~~
@@ -645,7 +682,7 @@ Values
645682
646683 untilE :: forall e. Eff e Prim.Boolean -> Eff e { }
647684
648− whileE :: forall e. Eff e Prim.Boolean -> Eff e { } -> Eff e { }
685+ whileE :: forall a. forall e. Eff e Prim.Boolean -> Eff e a -> Eff e { }
649686
650687Module Random
651688-------------
@@ -668,10 +705,10 @@ Values
668705
669706::
670707
671− random :: forall e. Eff random :: Random | e Prim.Number
708+ random :: forall e. Eff (random :: Random | e) Prim.Number
672709
673−Module Errors
674−-------------
710+Module Control.Monad.Error
711+--------------------------
675712
676713Types
677714~~~~~
@@ -691,12 +728,12 @@ Values
691728
692729::
693730
694− catchError :: forall a. forall r. forall e. (e -> Eff r a) -> Eff err :: Error e | r a -> Eff r a
731+ catchError :: forall a. forall r. forall e. (e -> Eff r a) -> Eff (err :: Error e | r) a -> Eff r a
695732
696− throwError :: forall r. forall e. forall a. e -> Eff err :: Error e | r a
733+ throwError :: forall r. forall e. forall a. e -> Eff (err :: Error e | r) a
697734
698−Module IORef
699−------------
735+Module Data.IORef
736+-----------------
700737
701738Types
702739~~~~~
@@ -718,18 +755,18 @@ Values
718755
719756::
720757
721− modifyIORef :: forall r. forall s. IORef s -> (s -> s) -> Eff ref :: Ref | r { }
758+ modifyIORef :: forall r. forall s. IORef s -> (s -> s) -> Eff (ref :: Ref | r) { }
722759
723− newIORef :: forall r. forall s. s -> Eff ref :: Ref | r (IORef s)
760+ newIORef :: forall r. forall s. s -> Eff (ref :: Ref | r) (IORef s)
724761
725− readIORef :: forall r. forall s. IORef s -> Eff ref :: Ref | r s
762+ readIORef :: forall r. forall s. IORef s -> Eff (ref :: Ref | r) s
726763
727− unsafeRunIORef :: forall a. forall eff. Eff ref :: Ref | eff a -> Eff eff a
764+ unsafeRunIORef :: forall a. forall eff. Eff (ref :: Ref | eff) a -> Eff eff a
728765
729− writeIORef :: forall r. forall s. IORef s -> s -> Eff ref :: Ref | r { }
766+ writeIORef :: forall r. forall s. IORef s -> s -> Eff (ref :: Ref | r) { }
730767
731−Module Trace
732−------------
768+Module Debug.Trace
769+------------------
733770
734771Types
735772~~~~~
@@ -749,12 +786,12 @@ Values
749786
750787::
751788
752− print :: forall r. forall a. (Prelude.Show (a)) => a -> Eff trace :: Trace | r { }
789+ print :: forall r. forall a. (Prelude.Show (a)) => a -> Eff (trace :: Trace | r) { }
753790
754− trace :: forall r. Prim.String -> Eff trace :: Trace | r { }
791+ trace :: forall r. Prim.String -> Eff (trace :: Trace | r) { }
755792
756−Module ST
757−---------
793+Module Control.Monad.ST
794+-----------------------
758795
759796Types
760797~~~~~
@@ -763,6 +800,8 @@ Types
763800
764801 data ST :: * -> !
765802
803+ data STArray :: * -> * -> *
804+
766805 data STRef :: * -> * -> *
767806
768807Type Classes
@@ -776,13 +815,42 @@ Values
776815
777816::
778817
779− modifySTRef :: forall r. forall h. forall a. STRef h a -> (a -> a) -> Eff st :: ST h | r { }
818+ modifySTRef :: forall r. forall h. forall a. STRef h a -> (a -> a) -> Eff (st :: ST h | r) a
819+
820+ newSTArray :: forall r. forall h. forall a. Prim.Number -> a -> Eff (st :: ST h | r) (STArray h a)
821+
822+ newSTRef :: forall r. forall h. forall a. a -> Eff (st :: ST h | r) (STRef h a)
823+
824+ peekSTArray :: forall r. forall h. forall a. STArray h a -> Eff (st :: ST h | r) a
825+
826+ pokeSTArray :: forall r. forall h. forall a. STArray h a -> Prim.Number -> a -> Eff (st :: ST h | r) a
827+
828+ readSTRef :: forall r. forall h. forall a. STRef h a -> Eff (st :: ST h | r) a
780829
781− newSTRef :: forall r. forall h. forall a. a -> Eff st :: ST h | r (STRef h a)
830+ runST :: forall r. forall a. forall h. Eff (st :: ST h | r) a -> Eff r a
782831
783− readSTRef :: forall r. forall h. forall a. STRef h a -> Eff st :: ST h | r a
832+ runSTArray :: forall r. forall a. forall h. Eff (st :: ST h | r) (STArray h a) -> Eff r [a]
784833
785− runST :: forall r. forall a. forall h. Eff st :: ST h | r a -> Eff r a
834+ writeSTRef :: forall r. forall h. forall a. STRef h a -> a -> Eff (st :: ST h | r) a
786835
787− writeSTRef :: forall r. forall h. forall a. STRef h a -> a -> Eff st :: ST h | r { }
836+Module Data.Enum
837+----------------
838+
839+Types
840+~~~~~
841+
842+Type Classes
843+~~~~~~~~~~~~
844+
845+::
846+
847+ class Enum a where
848+ toEnum :: Prim.Number -> Maybe a
849+ fromEnum :: a -> Prim.Number
850+
851+Type Class Instances
852+~~~~~~~~~~~~~~~~~~~~
853+
854+Values
855+~~~~~~
788856
prelude/README.md+97−35
@@ -127,6 +127,8 @@
127127
128128 flip :: forall c. forall b. forall a. (a -> b -> c) -> b -> a -> c
129129
130+ liftRef :: forall b. forall a. (a -> a -> b) -> Ref a -> Ref a -> b
131+
130132 numAdd :: Prim.Number -> Prim.Number -> Prim.Number
131133
132134 numAnd :: Prim.Number -> Prim.Number -> Prim.Number
@@ -174,7 +176,7 @@
174176 unsafeRefIneq :: forall a. a -> a -> Prim.Boolean
175177
176178
177−## Module Monoid
179+## Module Data.Monoid
178180
179181### Types
180182
@@ -198,7 +200,7 @@
198200 mconcat :: forall m. (Monoid (m)) => [m] -> m
199201
200202
201−## Module Monad
203+## Module Control.Monad
202204
203205### Types
204206
@@ -228,7 +230,7 @@
228230 when :: forall m. (Monad (m)) => Prim.Boolean -> m { } -> m { }
229231
230232
231−## Module Maybe
233+## Module Data.Maybe
232234
233235### Types
234236
@@ -258,7 +260,7 @@
258260 maybe :: forall b. forall a. b -> (a -> b) -> Maybe a -> b
259261
260262
261−## Module Either
263+## Module Data.Either
262264
263265### Types
264266
@@ -286,7 +288,7 @@
286288 either :: forall c. forall b. forall a. (a -> c) -> (b -> c) -> Either a b -> c
287289
288290
289−## Module Arrays
291+## Module Data.Array
290292
291293### Types
292294
@@ -319,13 +321,13 @@
319321
320322 filter :: forall a. (a -> Prim.Boolean) -> [a] -> [a]
321323
324+ find :: forall a. (a -> Prim.Boolean) -> [a] -> Maybe a
325+
322326 foldl :: forall b. forall a. (a -> b -> b) -> b -> [a] -> b
323327
324328 foldr :: forall b. forall a. (a -> b -> a) -> a -> [b] -> a
325329
326− head :: forall a. [a] -> a
327−
328− headSafe :: forall a. [a] -> Maybe a
330+ head :: forall a. [a] -> Maybe a
329331
330332 indexOf :: forall a. [a] -> a -> Prim.Number
331333
@@ -357,14 +359,30 @@
357359
358360 splice :: forall a. Prim.Number -> Prim.Number -> [a] -> [a] -> [a]
359361
360− tail :: forall a. [a] -> [a]
361−
362− tailSafe :: forall a. [a] -> Maybe [a]
362+ tail :: forall a. [a] -> Maybe [a]
363363
364364 zipWith :: forall c. forall b. forall a. (a -> b -> c) -> [a] -> [b] -> [c]
365365
366366
367−## Module Tuples
367+## Module Data.Array.Unsafe
368+
369+### Types
370+
371+
372+### Type Classes
373+
374+
375+### Type Class Instances
376+
377+
378+### Values
379+
380+ head :: forall a. [a] -> a
381+
382+ tail :: forall a. [a] -> [a]
383+
384+
385+## Module Data.Tuple
368386
369387### Types
370388
@@ -391,7 +409,7 @@
391409 zip :: forall b. forall a. [a] -> [b] -> [Tuple a b]
392410
393411
394−## Module String
412+## Module Data.String
395413
396414### Types
397415
@@ -431,7 +449,7 @@
431449 trim :: Prim.String -> Prim.String
432450
433451
434−## Module Regex
452+## Module Data.String.Regex
435453
436454### Types
437455
@@ -524,16 +542,28 @@
524542
525543 cos :: Prim.Number -> Prim.Number
526544
545+ e :: Prim.Number
546+
527547 exp :: Prim.Number -> Prim.Number
528548
529549 floor :: Prim.Number -> Prim.Number
530550
551+ ln10 :: Prim.Number
552+
553+ ln2 :: Prim.Number
554+
531555 log :: Prim.Number -> Prim.Number
532556
557+ log10e :: Prim.Number
558+
559+ log2e :: Prim.Number
560+
533561 max :: Prim.Number -> Prim.Number
534562
535563 min :: Prim.Number -> Prim.Number
536564
565+ pi :: Prim.Number
566+
537567 pow :: Prim.Number -> Prim.Number
538568
539569 round :: Prim.Number -> Prim.Number
@@ -542,10 +572,14 @@
542572
543573 sqrt :: Prim.Number -> Prim.Number
544574
575+ sqrt1_2 :: Prim.Number
576+
577+ sqrt2 :: Prim.Number
578+
545579 tan :: Prim.Number -> Prim.Number
546580
547581
548−## Module Eff
582+## Module Control.Monad.Eff
549583
550584### Types
551585
@@ -576,7 +610,7 @@
576610
577611 untilE :: forall e. Eff e Prim.Boolean -> Eff e { }
578612
579− whileE :: forall e. Eff e Prim.Boolean -> Eff e { } -> Eff e { }
613+ whileE :: forall a. forall e. Eff e Prim.Boolean -> Eff e a -> Eff e { }
580614
581615
582616## Module Random
@@ -594,10 +628,10 @@
594628
595629### Values
596630
597− random :: forall e. Eff random :: Random | e Prim.Number
631+ random :: forall e. Eff (random :: Random | e) Prim.Number
598632
599633
600−## Module Errors
634+## Module Control.Monad.Error
601635
602636### Types
603637
@@ -612,12 +646,12 @@
612646
613647### Values
614648
615− catchError :: forall a. forall r. forall e. (e -> Eff r a) -> Eff err :: Error e | r a -> Eff r a
649+ catchError :: forall a. forall r. forall e. (e -> Eff r a) -> Eff (err :: Error e | r) a -> Eff r a
616650
617− throwError :: forall r. forall e. forall a. e -> Eff err :: Error e | r a
651+ throwError :: forall r. forall e. forall a. e -> Eff (err :: Error e | r) a
618652
619653
620−## Module IORef
654+## Module Data.IORef
621655
622656### Types
623657
@@ -634,18 +668,18 @@
634668
635669### Values
636670
637− modifyIORef :: forall r. forall s. IORef s -> (s -> s) -> Eff ref :: Ref | r { }
671+ modifyIORef :: forall r. forall s. IORef s -> (s -> s) -> Eff (ref :: Ref | r) { }
638672
639− newIORef :: forall r. forall s. s -> Eff ref :: Ref | r (IORef s)
673+ newIORef :: forall r. forall s. s -> Eff (ref :: Ref | r) (IORef s)
640674
641− readIORef :: forall r. forall s. IORef s -> Eff ref :: Ref | r s
675+ readIORef :: forall r. forall s. IORef s -> Eff (ref :: Ref | r) s
642676
643− unsafeRunIORef :: forall a. forall eff. Eff ref :: Ref | eff a -> Eff eff a
677+ unsafeRunIORef :: forall a. forall eff. Eff (ref :: Ref | eff) a -> Eff eff a
644678
645− writeIORef :: forall r. forall s. IORef s -> s -> Eff ref :: Ref | r { }
679+ writeIORef :: forall r. forall s. IORef s -> s -> Eff (ref :: Ref | r) { }
646680
647681
648−## Module Trace
682+## Module Debug.Trace
649683
650684### Types
651685
@@ -660,17 +694,19 @@
660694
661695### Values
662696
663− print :: forall r. forall a. (Prelude.Show (a)) => a -> Eff trace :: Trace | r { }
697+ print :: forall r. forall a. (Prelude.Show (a)) => a -> Eff (trace :: Trace | r) { }
664698
665− trace :: forall r. Prim.String -> Eff trace :: Trace | r { }
699+ trace :: forall r. Prim.String -> Eff (trace :: Trace | r) { }
666700
667701
668−## Module ST
702+## Module Control.Monad.ST
669703
670704### Types
671705
672706 data ST :: * -> !
673707
708+ data STArray :: * -> * -> *
709+
674710 data STRef :: * -> * -> *
675711
676712
@@ -682,15 +718,41 @@
682718
683719### Values
684720
685− modifySTRef :: forall r. forall h. forall a. STRef h a -> (a -> a) -> Eff st :: ST h | r { }
721+ modifySTRef :: forall r. forall h. forall a. STRef h a -> (a -> a) -> Eff (st :: ST h | r) a
722+
723+ newSTArray :: forall r. forall h. forall a. Prim.Number -> a -> Eff (st :: ST h | r) (STArray h a)
724+
725+ newSTRef :: forall r. forall h. forall a. a -> Eff (st :: ST h | r) (STRef h a)
726+
727+ peekSTArray :: forall r. forall h. forall a. STArray h a -> Eff (st :: ST h | r) a
728+
729+ pokeSTArray :: forall r. forall h. forall a. STArray h a -> Prim.Number -> a -> Eff (st :: ST h | r) a
730+
731+ readSTRef :: forall r. forall h. forall a. STRef h a -> Eff (st :: ST h | r) a
732+
733+ runST :: forall r. forall a. forall h. Eff (st :: ST h | r) a -> Eff r a
686734
687− newSTRef :: forall r. forall h. forall a. a -> Eff st :: ST h | r (STRef h a)
735+ runSTArray :: forall r. forall a. forall h. Eff (st :: ST h | r) (STArray h a) -> Eff r [a]
688736
689− readSTRef :: forall r. forall h. forall a. STRef h a -> Eff st :: ST h | r a
737+ writeSTRef :: forall r. forall h. forall a. STRef h a -> a -> Eff (st :: ST h | r) a
690738
691− runST :: forall r. forall a. forall h. Eff st :: ST h | r a -> Eff r a
692739
693− writeSTRef :: forall r. forall h. forall a. STRef h a -> a -> Eff st :: ST h | r { }
740+## Module Data.Enum
741+
742+### Types
743+
744+
745+### Type Classes
746+
747+ class Enum a where
748+ toEnum :: Prim.Number -> Maybe a
749+ fromEnum :: a -> Prim.Number
750+
751+
752+### Type Class Instances
753+
754+
755+### Values
694756
695757
696758