replace liftM2 with liftA2
This commit is contained in:
parent
3237c127e0
commit
1f469f35ab
1 changed files with 1 additions and 1 deletions
|
@ -56,7 +56,7 @@ joinSegs (P ps) = fmap mconcat $ sequence ps
|
||||||
joinSegs (Shift dx dy segs) = do
|
joinSegs (Shift dx dy segs) = do
|
||||||
E {size} <- ask
|
E {size} <- ask
|
||||||
localS (Svg.shift (size * dx, size * dy)) $ joinSegs segs
|
localS (Svg.shift (size * dx, size * dy)) $ joinSegs segs
|
||||||
joinSegs (ss1 :<>: ss2) = liftM2 (<>) (joinSegs ss1) (joinSegs ss2)
|
joinSegs (ss1 :<>: ss2) = liftA2 (<>) (joinSegs ss1) (joinSegs ss2)
|
||||||
|
|
||||||
localS :: MonadState s m => (s -> s) -> m a -> m a
|
localS :: MonadState s m => (s -> s) -> m a -> m a
|
||||||
localS f m = do old <- get; modify f; res <- m; put old; pure res
|
localS f m = do old <- get; modify f; res <- m; put old; pure res
|
||||||
|
|
Loading…
Reference in a new issue