From a3c4d1590c2082ec5fc6b41eb6578f3d90bf23c8 Mon Sep 17 00:00:00 2001 From: Gary Burgess Date: Sun, 23 Oct 2016 21:05:05 +0100 Subject: [PATCH] Fix applicative instance for ParAff Resolves #76 --- src/Control/Monad/Aff.purs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Control/Monad/Aff.purs b/src/Control/Monad/Aff.purs index c2f5748..b3696e3 100644 --- a/src/Control/Monad/Aff.purs +++ b/src/Control/Monad/Aff.purs @@ -236,7 +236,8 @@ instance applyParAff :: Apply (ParAff e) where putOrKill :: forall a. AVar a -> Either Error a -> Aff e Unit putOrKill v = either (killVar v) (putVar v) -derive newtype instance applicativeParAff :: Applicative (ParAff e) +instance applicativeParAff :: Applicative (ParAff e) where + pure = ParAff <<< pure -- | Returns the first value, or the first error if both error. instance altParAff :: Alt (ParAff e) where