Skip to content

Commit 4309572

Browse files
authored
Merge pull request #102 from LiamGoodacre/feature/redundant-constraints
Remove redundant Applicative constraints
2 parents 46b907a + 20e5483 commit 4309572

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

src/Data/Lens/Traversal.purs

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,10 @@ traversed = wander traverse
5454

5555
-- | Turn a pure profunctor `Traversal` into a `lens`-like `Traversal`.
5656
traverseOf
57-
:: forall f s t a b
58-
. Applicative f
59-
=> Optic (Star f) s t a b -> (a -> f b) -> s -> f t
57+
:: forall f s t a b . Optic (Star f) s t a b -> (a -> f b) -> s -> f t
6058
traverseOf = under Star
6159

62-
-- | Sequence the foci of a `Traversal`, pulling out an `Applicative` effect.
60+
-- | Sequence the foci of an optic, pulling out an "effect".
6361
-- | If you do not need the result, see `sequenceOf_` for `Fold`s.
6462
-- |
6563
-- | `sequenceOf traversed` has the same result as `Data.Traversable.sequence`:
@@ -83,11 +81,8 @@ traverseOf = under Star
8381
-- | [0.15556037108154985,0.28500369615270515]
8482
-- | unit
8583
-- | ```
86-
8784
sequenceOf
88-
:: forall f s t a
89-
. Applicative f
90-
=> Optic (Star f) s t (f a) a -> s -> f t
85+
:: forall f s t a . Optic (Star f) s t (f a) a -> s -> f t
9186
sequenceOf t = traverseOf t identity
9287

9388
-- | Tries to map over a `Traversal`; returns `empty` if the traversal did
@@ -134,8 +129,7 @@ elementsOf tr pr = iwander \f ->
134129
-- | Turn a pure profunctor `IndexedTraversal` into a `lens`-like `IndexedTraversal`.
135130
itraverseOf
136131
:: forall f i s t a b
137-
. Applicative f
138-
=> IndexedOptic (Star f) i s t a b
132+
. IndexedOptic (Star f) i s t a b
139133
-> (i -> a -> f b)
140134
-> s
141135
-> f t
@@ -144,8 +138,7 @@ itraverseOf t = under Star (t <<< Indexed) <<< uncurry
144138
-- | Flipped version of `itraverseOf`.
145139
iforOf
146140
:: forall f i s t a b
147-
. Applicative f
148-
=> IndexedOptic (Star f) i s t a b
141+
. IndexedOptic (Star f) i s t a b
149142
-> s
150143
-> (i -> a -> f b)
151144
-> f t

0 commit comments

Comments
 (0)