From 2c660d5cf4255a9c80d036fba8cd6ef66b0ba498 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Mon, 20 May 2024 16:32:00 +0000 Subject: [PATCH] Restyled by hlint --- src/Polysemy/ConstraintAbsorber.hs | 2 +- src/Polysemy/ConstraintAbsorber/MonadCatch.hs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Polysemy/ConstraintAbsorber.hs b/src/Polysemy/ConstraintAbsorber.hs index 2640db9f..07fc4e2e 100644 --- a/src/Polysemy/ConstraintAbsorber.hs +++ b/src/Polysemy/ConstraintAbsorber.hs @@ -48,6 +48,6 @@ absorbWithSem :: absorbWithSem d i m = R.reify d $ \(_ :: Proxy (s :: Type)) -> m \\ C.trans - (C.unsafeCoerceConstraint :: ((p (x m s) :- p m))) + (C.unsafeCoerceConstraint :: (p (x m s) :- p m)) i {-# INLINEABLE absorbWithSem #-} diff --git a/src/Polysemy/ConstraintAbsorber/MonadCatch.hs b/src/Polysemy/ConstraintAbsorber/MonadCatch.hs index a3a6f379..810d2db9 100644 --- a/src/Polysemy/ConstraintAbsorber/MonadCatch.hs +++ b/src/Polysemy/ConstraintAbsorber/MonadCatch.hs @@ -77,7 +77,7 @@ absorbMonadThrow :: -- 'Sem'. This might be something with type @'C.MonadCatch' e m => m a@. (C.MonadThrow (Sem r) => Sem r a) -> Sem r a -absorbMonadThrow main = absorbMonadCatch main +absorbMonadThrow = absorbMonadCatch {-# INLINEABLE absorbMonadThrow #-} ------------------------------------------------------------------------------ @@ -122,7 +122,7 @@ instance catch x f = let catchF = catch_ (reflect $ Proxy @s') in Action $ - (action x) `catchF` \e -> case C.fromException e of + action x `catchF` \e -> case C.fromException e of Just e' -> action $ f e' _ -> throwM_ (reflect $ Proxy @s') (C.toException e) {-# INLINEABLE catch #-}