|
2 | 2 |
|
3 | 3 | ## Module Data.Const
|
4 | 4 |
|
5 |
| -### Types |
| 5 | +#### `Const` |
6 | 6 |
|
7 |
| - newtype Const a b where |
8 |
| - Const :: a -> Const a b |
| 7 | +``` purescript |
| 8 | +newtype Const a b |
| 9 | + = Const a |
| 10 | +``` |
9 | 11 |
|
10 | 12 |
|
11 |
| -### Type Class Instances |
| 13 | +#### `getConst` |
12 | 14 |
|
13 |
| - instance applicativeConst :: (Monoid a) => Applicative (Const a) |
| 15 | +``` purescript |
| 16 | +getConst :: forall a b. Const a b -> a |
| 17 | +``` |
14 | 18 |
|
15 |
| - instance applyConst :: (Semigroup a) => Apply (Const a) |
16 | 19 |
|
17 |
| - instance bindConst :: (Semigroup a) => Bind (Const a) |
| 20 | +#### `eqConst` |
18 | 21 |
|
19 |
| - instance contravariantConst :: Contravariant (Const a) |
| 22 | +``` purescript |
| 23 | +instance eqConst :: (Eq a) => Eq (Const a b) |
| 24 | +``` |
20 | 25 |
|
21 |
| - instance eqConst :: (Eq a) => Eq (Const a b) |
22 | 26 |
|
23 |
| - instance foldableConst :: Foldable (Const a) |
| 27 | +#### `ordConst` |
24 | 28 |
|
25 |
| - instance functorConst :: Functor (Const a) |
| 29 | +``` purescript |
| 30 | +instance ordConst :: (Ord a) => Ord (Const a b) |
| 31 | +``` |
26 | 32 |
|
27 |
| - instance monoidConst :: (Monoid a) => Monoid (Const a b) |
28 | 33 |
|
29 |
| - instance ordConst :: (Ord a) => Ord (Const a b) |
| 34 | +#### `showConst` |
30 | 35 |
|
31 |
| - instance semigroupConst :: (Semigroup a) => Semigroup (Const a b) |
| 36 | +``` purescript |
| 37 | +instance showConst :: (Show a) => Show (Const a b) |
| 38 | +``` |
32 | 39 |
|
33 |
| - instance semigroupoidConst :: Semigroupoid Const |
34 | 40 |
|
35 |
| - instance showConst :: (Show a) => Show (Const a b) |
| 41 | +#### `semigroupoidConst` |
36 | 42 |
|
37 |
| - instance traversableConst :: Traversable (Const a) |
| 43 | +``` purescript |
| 44 | +instance semigroupoidConst :: Semigroupoid Const |
| 45 | +``` |
38 | 46 |
|
39 | 47 |
|
40 |
| -### Values |
| 48 | +#### `semigroupConst` |
41 | 49 |
|
42 |
| - getConst :: forall a b. Const a b -> a |
| 50 | +``` purescript |
| 51 | +instance semigroupConst :: (Semigroup a) => Semigroup (Const a b) |
| 52 | +``` |
| 53 | + |
| 54 | + |
| 55 | +#### `monoidConst` |
| 56 | + |
| 57 | +``` purescript |
| 58 | +instance monoidConst :: (Monoid a) => Monoid (Const a b) |
| 59 | +``` |
| 60 | + |
| 61 | + |
| 62 | +#### `functorConst` |
| 63 | + |
| 64 | +``` purescript |
| 65 | +instance functorConst :: Functor (Const a) |
| 66 | +``` |
| 67 | + |
| 68 | + |
| 69 | +#### `applyConst` |
| 70 | + |
| 71 | +``` purescript |
| 72 | +instance applyConst :: (Semigroup a) => Apply (Const a) |
| 73 | +``` |
| 74 | + |
| 75 | + |
| 76 | +#### `bindConst` |
| 77 | + |
| 78 | +``` purescript |
| 79 | +instance bindConst :: (Semigroup a) => Bind (Const a) |
| 80 | +``` |
| 81 | + |
| 82 | + |
| 83 | +#### `applicativeConst` |
| 84 | + |
| 85 | +``` purescript |
| 86 | +instance applicativeConst :: (Monoid a) => Applicative (Const a) |
| 87 | +``` |
| 88 | + |
| 89 | + |
| 90 | +#### `contravariantConst` |
| 91 | + |
| 92 | +``` purescript |
| 93 | +instance contravariantConst :: Contravariant (Const a) |
| 94 | +``` |
| 95 | + |
| 96 | + |
| 97 | +#### `foldableConst` |
| 98 | + |
| 99 | +``` purescript |
| 100 | +instance foldableConst :: Foldable (Const a) |
| 101 | +``` |
| 102 | + |
| 103 | + |
| 104 | +#### `traversableConst` |
| 105 | + |
| 106 | +``` purescript |
| 107 | +instance traversableConst :: Traversable (Const a) |
| 108 | +``` |
0 commit comments