on master help sign in
Relax constraints of Conc instances and conc
b9ec53dAndrzej Rybczak
src/Effectful/Async.hs+5−5
@@ -457,25 +457,25 @@ data Conc es a where
457
457
458deriving instance Functor (Conc es)
458deriving instance Functor (Conc es)
459
459
460−instance AsyncE :> es => Applicative (Conc es) where
460+instance Applicative (Conc es) where
461 pure = Pure
461 pure = Pure
462 (<*>) = Apply
462 (<*>) = Apply
463 (<*) = LiftA2 (\x _ -> x)
463 (<*) = LiftA2 (\x _ -> x)
464 (*>) = LiftA2 (\_ y -> y)
464 (*>) = LiftA2 (\_ y -> y)
465 liftA2 = LiftA2
465 liftA2 = LiftA2
466
466
467−instance AsyncE :> es => Alternative (Conc es) where
467+instance Alternative (Conc es) where
468 empty = Empty
468 empty = Empty
469 (<|>) = Alt
469 (<|>) = Alt
470
470
471−instance (AsyncE :> es, Semigroup a) => Semigroup (Conc es a) where
471+instance Semigroup a => Semigroup (Conc es a) where
472 (<>) = liftA2 (<>)
472 (<>) = liftA2 (<>)
473
473
474−instance (AsyncE :> es, Monoid a) => Monoid (Conc es a) where
474+instance Monoid a => Monoid (Conc es a) where
475 mempty = pure mempty
475 mempty = pure mempty
476
476
477-- | Lifted 'U.conc'.
477-- | Lifted 'U.conc'.
478−conc :: AsyncE :> es => Eff es a -> Conc es a
478+conc :: Eff es a -> Conc es a
479conc = Action
479conc = Action
480
480
481-- | Lifted 'U.runConc'.
481-- | Lifted 'U.runConc'.