Skip to content

Commit

Permalink
Generalize %~ to polymorphic update.
Browse files Browse the repository at this point in the history
  • Loading branch information
robrix committed Oct 18, 2020
1 parent c89b866 commit 161652c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Control/Effect/Parser/Lens.hs
Expand Up @@ -25,7 +25,7 @@ l .~ b = coerce . l (const (Identity b))

infixr 4 .~

(%~) :: Lens' s a -> (a -> a) -> s -> s
(%~) :: Lens s t a b -> (a -> b) -> s -> t
l %~ f = runIdentity . l (Identity . f)
{-# INLINE (%~) #-}

Expand Down

0 comments on commit 161652c

Please sign in to comment.