File tree 3 files changed +62
-0
lines changed
3 files changed +62
-0
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,38 @@ If you are have a conflict between `<|>` in `Prelude` and `Control.Alt` please u
62
62
join :: forall a m. (Bind m) => m (m a) -> m a
63
63
64
64
65
+ ## Module Control.Comonad
66
+
67
+ ### Type Classes
68
+
69
+ class (Extend w) <= Comonad w where
70
+ extract :: forall a. w a -> a
71
+
72
+
73
+ ## Module Control.Extend
74
+
75
+ ### Type Classes
76
+
77
+ class (Functor w) <= Extend w where
78
+ (<<=) :: forall b a. (w a -> b) -> w a -> w b
79
+
80
+
81
+ ### Type Class Instances
82
+
83
+ instance extendArr :: (Semigroup w) => Extend (Prim.Function w)
84
+
85
+
86
+ ### Values
87
+
88
+ (=<=) :: forall b a w c. (Extend w) => (w b -> c) -> (w a -> b) -> w a -> c
89
+
90
+ (=>=) :: forall b a w c. (Extend w) => (w a -> b) -> (w b -> c) -> w a -> c
91
+
92
+ (=>>) :: forall b a w. (Extend w) => w a -> (w a -> b) -> w b
93
+
94
+ duplicate :: forall a w. (Extend w) => w a -> w (w a)
95
+
96
+
65
97
## Module Control.Lazy
66
98
67
99
### Type Classes
Original file line number Diff line number Diff line change
1
+ module Control.Comonad where
2
+
3
+ import Control.Extend
4
+
5
+ class (Extend w ) <= Comonad w where
6
+ extract :: forall a . w a -> a
Original file line number Diff line number Diff line change
1
+ module Control.Extend where
2
+
3
+ infixl 1 =>>
4
+ infixr 1 <<=
5
+ infixr 1 =>=
6
+ infixr 1 =<=
7
+
8
+ class (Functor w ) <= Extend w where
9
+ (<<=) :: forall b a . (w a -> b ) -> w a -> w b
10
+
11
+ instance extendArr :: (Semigroup w ) => Extend ((-> ) w ) where
12
+ (<<=) f g w = f \w' -> g (w <> w')
13
+
14
+ (=>>) :: forall b a w . (Extend w ) => w a -> (w a -> b ) -> w b
15
+ (=>>) w f = f <<= w
16
+
17
+ (=>=) :: forall b a w c . (Extend w ) => (w a -> b ) -> (w b -> c ) -> w a -> c
18
+ (=>=) f g w = g (f <<= w)
19
+
20
+ (=<=) :: forall b a w c . (Extend w ) => (w b -> c ) -> (w a -> b ) -> w a -> c
21
+ (=<=) f g w = f (g <<= w)
22
+
23
+ duplicate :: forall a w . (Extend w ) => w a -> w (w a )
24
+ duplicate w = id <<= w
You can’t perform that action at this time.
0 commit comments