@@ -17,16 +17,25 @@ Types
17Type Classes
17Type Classes
18~~~~~~~~~~~~
18~~~~~~~~~~~~
20+.. figure:: images/Prelude.png
22 class Alternative f where
26 class Alternative f where
23 empty :: forall a. f a
27 empty :: forall a. f a
24 (<|>) :: forall a. f a -> f a -> f a
28 (<|>) :: forall a. f a -> f a -> f a
26− class Applicative f where
30+ class (Apply f) <= Applicative f where
27 pure :: forall a. a -> f a
31 pure :: forall a. a -> f a
33+ class (Functor f) <= Apply f where
28 (<*>) :: forall a b. f (a -> b) -> f a -> f b
34 (<*>) :: forall a b. f (a -> b) -> f a -> f b
36+ class (Apply m) <= Bind m where
37+ (>>=) :: forall a b. m a -> (a -> m b) -> m b
30 class Bits b where
39 class Bits b where
31 (&) :: b -> b -> b
40 (&) :: b -> b -> b
32 (|) :: b -> b -> b
41 (|) :: b -> b -> b
@@ -41,9 +50,8 @@ Type Classes
41 (||) :: b -> b -> b
50 (||) :: b -> b -> b
42 not :: b -> b
51 not :: b -> b
44− class Category a where
53+ class (Semigroupoid a) <= Category a where
45 id :: forall t. a t t
54 id :: forall t. a t t
46− (<<<) :: forall b c d. a c d -> a b c -> a b d
48 class Eq a where
56 class Eq a where
49 (==) :: a -> a -> Prim.Boolean
57 (==) :: a -> a -> Prim.Boolean
@@ -52,9 +60,7 @@ Type Classes
52 class Functor f where
60 class Functor f where
53 (<$>) :: forall a b. (a -> b) -> f a -> f b
61 (<$>) :: forall a b. (a -> b) -> f a -> f b
55− class Monad m where
63+ class (Applicative m, Bind m) <= Monad m where
56− return :: forall a. a -> m a
57− (>>=) :: forall a b. m a -> (a -> m b) -> m b
59 class Num a where
65 class Num a where
60 (+) :: a -> a -> a
66 (+) :: a -> a -> a
@@ -64,9 +70,15 @@ Type Classes
64 (%) :: a -> a -> a
70 (%) :: a -> a -> a
65 negate :: a -> a
71 negate :: a -> a
67− class Ord a where
73+ class (Eq a) <= Ord a where
68 compare :: a -> a -> Ordering
74 compare :: a -> a -> Ordering
76+ class Semigroup a where
79+ class Semigroupoid a where
80+ (<<<) :: forall b c d. a c d -> a b c -> a b d
70 class Show a where
82 class Show a where
71 show :: a -> Prim.String
83 show :: a -> Prim.String
@@ -75,8 +87,6 @@ Type Class Instances
78− instance applicativeFromMonad :: (Monad m) => Applicative m
80 instance bitsNumber :: Bits Prim.Number
90 instance bitsNumber :: Bits Prim.Number
82 instance boolLikeBoolean :: BoolLike Prim.Boolean
92 instance boolLikeBoolean :: BoolLike Prim.Boolean
@@ -89,14 +99,20 @@ Type Class Instances
90 instance eqNumber :: Eq Prim.Number
100 instance eqNumber :: Eq Prim.Number
92− instance eqString :: Eq Prim.String
102+ instance eqOrdering :: Eq Ordering
94− instance functorFromApplicative :: (Applicative f) => Functor f
104+ instance eqString :: Eq Prim.String
96 instance numNumber :: Num Prim.Number
106 instance numNumber :: Num Prim.Number
98 instance ordNumber :: Ord Prim.Number
108 instance ordNumber :: Ord Prim.Number
110+ instance semigroupString :: Semigroup Prim.String
112+ instance semigroupoidArr :: Semigroupoid Prim.Function
114+ instance showArray :: (Show a) => Show [a]
100 instance showBoolean :: Show Prim.Boolean
116 instance showBoolean :: Show Prim.Boolean
102 instance showNumber :: Show Prim.Number
118 instance showNumber :: Show Prim.Number
@@ -110,13 +126,13 @@ Values
113− (!!) :: forall a. [a] -> Prim.Number -> a
115 (#) :: forall a b. a -> (a -> b) -> b
129 (#) :: forall a b. a -> (a -> b) -> b
117 ($) :: forall a b. (a -> b) -> a -> b
131 ($) :: forall a b. (a -> b) -> a -> b
119− (++) :: Prim.String -> Prim.String -> Prim.String
133+ (++) :: forall s. (Semigroup s) => s -> s -> s
135+ (:) :: forall a. a -> [a] -> [a]
121 (<) :: forall a. (Ord a) => a -> a -> Prim.Boolean
137 (<) :: forall a. (Ord a) => a -> a -> Prim.Boolean
@@ -126,7 +142,11 @@ Values
127 (>=) :: forall a. (Ord a) => a -> a -> Prim.Boolean
143 (>=) :: forall a. (Ord a) => a -> a -> Prim.Boolean
129− (>>>) :: forall a b c d. (Category a) => a b c -> a c d -> a b d
145+ (>>>) :: forall a b c d. (Semigroupoid a) => a b c -> a c d -> a b d
147+ ap :: forall m a b. (Monad m) => m (a -> b) -> m a -> m b
149+ asTypeOf :: forall a. a -> a -> a
131 boolAnd :: Prim.Boolean -> Prim.Boolean -> Prim.Boolean
151 boolAnd :: Prim.Boolean -> Prim.Boolean -> Prim.Boolean
@@ -134,10 +154,18 @@ Values
135 boolOr :: Prim.Boolean -> Prim.Boolean -> Prim.Boolean
155 boolOr :: Prim.Boolean -> Prim.Boolean -> Prim.Boolean
157+ concatString :: Prim.String -> Prim.String -> Prim.String
159+ cons :: forall a. a -> [a] -> [a]
137 const :: forall a b. a -> b -> a
161 const :: forall a b. a -> b -> a
139 flip :: forall a b c. (a -> b -> c) -> b -> a -> c
163 flip :: forall a b c. (a -> b -> c) -> b -> a -> c
165+ liftA1 :: forall f a b. (Applicative f) => (a -> b) -> f a -> f b
167+ liftM1 :: forall m a b. (Monad m) => (a -> b) -> m a -> m b
141 numAdd :: Prim.Number -> Prim.Number -> Prim.Number
169 numAdd :: Prim.Number -> Prim.Number -> Prim.Number
143 numAnd :: Prim.Number -> Prim.Number -> Prim.Number
171 numAnd :: Prim.Number -> Prim.Number -> Prim.Number
@@ -166,14 +194,37 @@ Values
167 numZshr :: Prim.Number -> Prim.Number -> Prim.Number
195 numZshr :: Prim.Number -> Prim.Number -> Prim.Number
169− on :: forall a b c. (b -> b -> c) -> (a -> b) -> a -> a -> c
171 refEq :: forall a. a -> a -> Prim.Boolean
197 refEq :: forall a. a -> a -> Prim.Boolean
173 refIneq :: forall a. a -> a -> Prim.Boolean
199 refIneq :: forall a. a -> a -> Prim.Boolean
201+ return :: forall m a. (Monad m) => a -> m a
203+ showArrayImpl :: forall a. (a -> Prim.String) -> [a] -> Prim.String
175 showNumberImpl :: Prim.Number -> Prim.String
205 showNumberImpl :: Prim.Number -> Prim.String
207+ showStringImpl :: Prim.String -> Prim.String
226+ on :: forall a b c. (b -> b -> c) -> (a -> b) -> a -> a -> c
177Module Data.Eq
228Module Data.Eq
178--------------
229--------------
@@ -202,6 +253,25 @@ Values
203 liftRef :: forall a b. (a -> a -> b) -> Ref a -> Ref a -> b
254 liftRef :: forall a b. (a -> a -> b) -> Ref a -> Ref a -> b
256+Module Prelude.Unsafe
257+---------------------
273+ unsafeIndex :: forall a. [a] -> Prim.Number -> a
205Module Control.Monad.Eff
275Module Control.Monad.Eff
206------------------------
276------------------------
@@ -222,6 +292,14 @@ Type Class Instances
295+ instance applicativeEff :: Applicative (Eff e)
297+ instance applyEff :: Apply (Eff e)
299+ instance bindEff :: Bind (Eff e)
301+ instance functorEff :: Functor (Eff e)
225 instance monadEff :: Monad (Eff e)
303 instance monadEff :: Monad (Eff e)
@@ -229,13 +307,13 @@ Values
232− bindEff :: forall e a b. Eff e a -> (a -> Eff e b) -> Eff e b
310+ bindE :: forall e a b. Eff e a -> (a -> Eff e b) -> Eff e b
234 forE :: forall e. Prim.Number -> Prim.Number -> (Prim.Number -> Eff e { }) -> Eff e { }
312 forE :: forall e. Prim.Number -> Prim.Number -> (Prim.Number -> Eff e { }) -> Eff e { }
236 foreachE :: forall e a. [a] -> (a -> Eff e { }) -> Eff e { }
314 foreachE :: forall e a. [a] -> (a -> Eff e { }) -> Eff e { }
238− retEff :: forall e a. a -> Eff e a
316+ returnE :: forall e a. a -> Eff e a
240 runPure :: forall a. Pure a -> a
318 runPure :: forall a. Pure a -> a