File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ import Control.Monad.Rec.Class (class MonadRec, Step(..))
34
34
import Control.MonadPlus (class MonadPlus )
35
35
import Control.MonadZero (class MonadZero )
36
36
import Control.Parallel (parSequence_ )
37
- import Control.Parallel.Class (class Parallel , parallel , sequential )
37
+ import Control.Parallel.Class (class Parallel )
38
38
import Control.Plus (class Plus , empty )
39
39
import Data.Either (Either (..), isLeft )
40
40
import Data.Function.Uncurried as Fn
@@ -197,11 +197,8 @@ instance functorThread ∷ Functor (Thread eff) where
197
197
198
198
instance applyThread ∷ Apply (Thread eff ) where
199
199
apply t1 t2 = Thread
200
- { kill: \err → sequential $ parallel (killThread err t1) *> parallel (killThread err t2)
201
- , join: memoAff do
202
- f ← joinThread t1
203
- a ← joinThread t2
204
- pure (f a)
200
+ { kill: \err → parSequence_ [ killThread err t1, killThread err t2 ]
201
+ , join: memoAff (joinThread t1 <*> joinThread t2)
205
202
}
206
203
207
204
instance applicativeThread ∷ Applicative (Thread eff ) where
You can’t perform that action at this time.
0 commit comments