File tree 2 files changed +12
-0
lines changed 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 23
23
"purescript-maybe" : " master" ,
24
24
"purescript-newtype" : " master" ,
25
25
"purescript-prelude" : " master" ,
26
+ "purescript-profunctor" : " master" ,
26
27
"purescript-refs" : " master" ,
27
28
"purescript-transformers" : " master"
28
29
},
Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ import Data.Either (Either)
14
14
import Data.Functor.Compose (Compose (..))
15
15
import Data.Maybe (Maybe (..))
16
16
import Data.Newtype (class Newtype )
17
+ import Data.Profunctor.Costar (Costar (..))
18
+ import Data.Profunctor.Star (Star (..))
17
19
import Effect.Class (class MonadEffect , liftEffect )
18
20
import Effect.Ref as Ref
19
21
@@ -39,6 +41,15 @@ instance monadParMaybeT :: Parallel f m => Parallel (Compose f Maybe) (MaybeT m)
39
41
parallel (MaybeT ma) = Compose (parallel ma)
40
42
sequential (Compose fa) = MaybeT (sequential fa)
41
43
44
+ instance monadParStar :: Parallel f m => Parallel (Star f a ) (Star m a ) where
45
+ parallel (Star f) = (Star $ parallel <<< f)
46
+ sequential (Star f) = (Star $ sequential <<< f)
47
+
48
+ instance monadParCostar :: Parallel f m => Parallel (Costar f a ) (Costar m a ) where
49
+ parallel (Costar f) = (Costar $ sequential >>> f)
50
+ sequential (Costar f) = (Costar $ parallel >>> f)
51
+
52
+
42
53
-- | The `ParCont` type constructor provides an `Applicative` instance
43
54
-- | based on `ContT Unit m`, which waits for multiple continuations to be
44
55
-- | resumed simultaneously.
You can’t perform that action at this time.
0 commit comments