on master help sign in
Relax constraints of Conc instances and conc
commitb9ec53dd65a8d58490ff52ad80a8d87d01d6e41e authorAndrzej Rybczak <andrzej@rybczak.net> dateSat 10 Jul 2021, 23:57 (5 years ago) parent9f74175
1 file changed+5−5
src/Effectful/Async.hs+5−5
src/Effectful/Async.hs+5−5
@@ -457,25 +457,25 @@ data Conc es a where
457457
458458deriving instance Functor (Conc es)
459459
460−instance AsyncE :> es => Applicative (Conc es) where
460+instance Applicative (Conc es) where
461461 pure = Pure
462462 (<*>) = Apply
463463 (<*) = LiftA2 (\x _ -> x)
464464 (*>) = LiftA2 (\_ y -> y)
465465 liftA2 = LiftA2
466466
467−instance AsyncE :> es => Alternative (Conc es) where
467+instance Alternative (Conc es) where
468468 empty = Empty
469469 (<|>) = Alt
470470
471−instance (AsyncE :> es, Semigroup a) => Semigroup (Conc es a) where
471+instance Semigroup a => Semigroup (Conc es a) where
472472 (<>) = liftA2 (<>)
473473
474−instance (AsyncE :> es, Monoid a) => Monoid (Conc es a) where
474+instance Monoid a => Monoid (Conc es a) where
475475 mempty = pure mempty
476476
477477-- | Lifted 'U.conc'.
478−conc :: AsyncE :> es => Eff es a -> Conc es a
478+conc :: Eff es a -> Conc es a
479479conc = Action
480480
481481-- | Lifted 'U.runConc'.