Skip to content

Commit

Permalink
Making WitherableWithIndex depend on FilterableWithIndex
Browse files Browse the repository at this point in the history
This is a natural extension, and it's nice not to pollute your codebase with unnecessary assumptions to have access to the functionality.
  • Loading branch information
jcranch authored and phadej committed Nov 10, 2023
1 parent 6a39479 commit c354900
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion witherable/src/Witherable.hs
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ class (FunctorWithIndex i t, Filterable t) => FilterableWithIndex i t | t -> i w
{-# INLINE ifilter #-}

-- | Indexed variant of 'Witherable'.
class (TraversableWithIndex i t, Witherable t) => WitherableWithIndex i t | t -> i where
class (TraversableWithIndex i t, FilterableWithIndex i t, Witherable t) => WitherableWithIndex i t | t -> i where
-- | Effectful 'imapMaybe'.
--
-- @'iwither' (\ i -> 'pure' . f i) ≡ 'pure' . 'imapMaybe' f@
Expand Down

0 comments on commit c354900

Please sign in to comment.