Skip to content

Commit

Permalink
chore: Upgrade to mtl-2.3.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
dhess committed Feb 3, 2023
1 parent 2c898aa commit c6554ea
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 13 deletions.
3 changes: 2 additions & 1 deletion cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ package primer
package primer-service
test-options: "--size-cutoff=32768"

allow-newer: logging-effect:text
allow-newer:
logging-effect:text, *:mtl
2 changes: 1 addition & 1 deletion primer-rel8/primer-rel8.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ library
, hasql ^>=1.6
, hasql-pool ^>=0.8.0.3
, logging-effect ^>=1.3.13
, mtl >=2.2.2 && <2.4.0
, mtl ^>=2.3.1
, optics >=0.4 && <0.5.0
, primer ^>=0.7.2
, rel8 ^>=1.4
Expand Down
6 changes: 3 additions & 3 deletions primer-service/primer-service.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ library
, http-types ^>=0.12.3
, insert-ordered-containers ^>=0.2.5.1
, logging-effect ^>=1.3.13
, mtl >=2.2.2 && <2.4.0
, mtl ^>=2.3.1
, openapi3 >=3.2 && <3.3.0
, optics >=0.4 && <0.5.0
, primer ^>=0.7.2
Expand Down Expand Up @@ -186,7 +186,7 @@ test-suite service-test
, aeson-pretty
, base
, bytestring
, hedgehog ^>=1.1.1
, hedgehog ^>=1.2
, hedgehog-quickcheck ^>=0.1.1
, hspec ^>=2.9.4
, openapi3
Expand All @@ -201,7 +201,7 @@ test-suite service-test
, tasty ^>=1.4.1
, tasty-discover ^>=4.2.4
, tasty-golden ^>=2.3.5
, tasty-hedgehog ^>=1.2.0
, tasty-hedgehog ^>=1.4
, tasty-hspec ^>=1.2.0.1
, tasty-hunit ^>=0.10.0
, text
Expand Down
6 changes: 3 additions & 3 deletions primer/primer.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ library
, logging-effect ^>=1.3.13
, megaparsec >=8.0.0 && <9.3.0
, mmorph ^>=1.2.0
, mtl >=2.2.2 && <2.4.0
, mtl ^>=2.3.1
, optics >=0.4 && <0.5.0
, prettyprinter >=1.7.1 && <1.8.0
, prettyprinter-ansi-terminal >=1.1.3 && <1.2.0
Expand Down Expand Up @@ -157,13 +157,13 @@ library primer-hedgehog
build-depends:
, base
, containers
, hedgehog ^>=1.1.1
, hedgehog ^>=1.2
, mmorph ^>=1.2.0
, mtl
, primer
, primer-testlib
, tasty-discover ^>=4.2.4
, tasty-hedgehog ^>=1.2.0
, tasty-hedgehog ^>=1.4

library primer-testlib
visibility: public
Expand Down
5 changes: 0 additions & 5 deletions primer/src/Foreword.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ module Foreword (
adjustAt,
findAndAdjust,
findAndAdjustA,
modifyError,
mwhen,
munless,
hoistAccum,
Expand Down Expand Up @@ -119,10 +118,6 @@ findAndAdjustA p f = \case
[] -> pure Nothing
x : xs -> if p x then Just . (: xs) <$> f x else (x :) <<$>> findAndAdjustA p f xs

-- | Change the type of an error.
modifyError :: MonadError e' m => (e -> e') -> ExceptT e m a -> m a
modifyError f = runExceptT >=> either (throwError . f) pure

-- | @munless b x@ is `x` if `b` is 'False', otherwise it is 'mempty'.
-- It's like 'Control.Monad.unless' but for Monoids rather than Applicatives.
munless :: Monoid a => Bool -> a -> a
Expand Down

0 comments on commit c6554ea

Please sign in to comment.