|
2 | 2 |
|
3 | 3 | ## Module Data.Profunctor
|
4 | 4 |
|
5 |
| -### Type Classes |
| 5 | +#### `Profunctor` |
6 | 6 |
|
7 |
| - class Profunctor p where |
8 |
| - dimap :: forall a b c d. (a -> b) -> (c -> d) -> p b c -> p a d |
| 7 | +``` purescript |
| 8 | +class Profunctor p where |
| 9 | + dimap :: forall a b c d. (a -> b) -> (c -> d) -> p b c -> p a d |
| 10 | +``` |
9 | 11 |
|
10 | 12 |
|
11 |
| -### Type Class Instances |
| 13 | +#### `lmap` |
12 | 14 |
|
13 |
| - instance profunctorArr :: Profunctor Prim.Function |
| 15 | +``` purescript |
| 16 | +lmap :: forall a b c p. (Profunctor p) => (a -> b) -> p b c -> p a c |
| 17 | +``` |
14 | 18 |
|
15 | 19 |
|
16 |
| -### Values |
| 20 | +#### `rmap` |
17 | 21 |
|
18 |
| - lmap :: forall a b c p. (Profunctor p) => (a -> b) -> p b c -> p a c |
| 22 | +``` purescript |
| 23 | +rmap :: forall a b c p. (Profunctor p) => (b -> c) -> p a b -> p a c |
| 24 | +``` |
| 25 | + |
| 26 | + |
| 27 | +#### `profunctorArr` |
| 28 | + |
| 29 | +``` purescript |
| 30 | +instance profunctorArr :: Profunctor Prim.Function |
| 31 | +``` |
19 | 32 |
|
20 |
| - rmap :: forall a b c p. (Profunctor p) => (b -> c) -> p a b -> p a c |
21 | 33 |
|
22 | 34 |
|
23 | 35 | ## Module Data.Profunctor.Choice
|
24 | 36 |
|
25 |
| -### Type Classes |
| 37 | +#### `Choice` |
| 38 | + |
| 39 | +``` purescript |
| 40 | +class (Profunctor p) <= Choice p where |
| 41 | + left :: forall a b c. p a b -> p (Either a c) (Either b c) |
| 42 | + right :: forall a b c. p b c -> p (Either a b) (Either a c) |
| 43 | +``` |
26 | 44 |
|
27 |
| - class (Profunctor p) <= Choice p where |
28 |
| - left :: forall a b c. p a b -> p (Either a c) (Either b c) |
29 |
| - right :: forall a b c. p b c -> p (Either a b) (Either a c) |
30 | 45 |
|
| 46 | +#### `choiceArr` |
31 | 47 |
|
32 |
| -### Type Class Instances |
| 48 | +``` purescript |
| 49 | +instance choiceArr :: Choice Prim.Function |
| 50 | +``` |
33 | 51 |
|
34 |
| - instance choiceArr :: Choice Prim.Function |
35 | 52 |
|
36 | 53 |
|
37 | 54 | ## Module Data.Profunctor.Strong
|
38 | 55 |
|
39 |
| -### Type Classes |
| 56 | +#### `Strong` |
40 | 57 |
|
41 |
| - class (Profunctor p) <= Strong p where |
42 |
| - first :: forall a b c. p a b -> p (Tuple a c) (Tuple b c) |
43 |
| - second :: forall a b c. p b c -> p (Tuple a b) (Tuple a c) |
| 58 | +``` purescript |
| 59 | +class (Profunctor p) <= Strong p where |
| 60 | + first :: forall a b c. p a b -> p (Tuple a c) (Tuple b c) |
| 61 | + second :: forall a b c. p b c -> p (Tuple a b) (Tuple a c) |
| 62 | +``` |
44 | 63 |
|
45 | 64 |
|
46 |
| -### Type Class Instances |
| 65 | +#### `strongArr` |
47 | 66 |
|
48 |
| - instance strongArr :: Strong Prim.Function |
| 67 | +``` purescript |
| 68 | +instance strongArr :: Strong Prim.Function |
| 69 | +``` |
0 commit comments