From fa1dd6c3dc7e37928d78d807c103ae0afaa76c9d Mon Sep 17 00:00:00 2001
From: justinwoo <moomoowoo@gmail.com>
Date: Sun, 1 Oct 2017 16:03:03 +0300
Subject: [PATCH] Upgrade to Aff 4.0

---
 bower.json                | 12 ++++++------
 src/Control/Monad/IO.purs | 13 ++++++-------
 2 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/bower.json b/bower.json
index 2f27129..1e3ef1f 100644
--- a/bower.json
+++ b/bower.json
@@ -7,14 +7,14 @@
     "output"
   ],
   "dependencies": {
-    "purescript-aff": "^3.0.0",
-    "purescript-control": "^3.0.0",
+    "purescript-aff": "^4.0.0",
+    "purescript-control": "^3.3.0",
     "purescript-eff": "^3.1.0",
-    "purescript-exceptions": "^3.0.0",
-    "purescript-monoid": "^3.0.0",
+    "purescript-exceptions": "^3.1.0",
+    "purescript-monoid": "^3.2.0",
     "purescript-newtype": "^2.0.0",
-    "purescript-prelude": "^3.0.0",
-    "purescript-tailrec": "^3.1.0",
+    "purescript-prelude": "^3.1.0",
+    "purescript-tailrec": "^3.3.0",
     "purescript-transformers": "^3.4.0"
   },
   "devDependencies": {
diff --git a/src/Control/Monad/IO.purs b/src/Control/Monad/IO.purs
index cde46c7..49ffd93 100644
--- a/src/Control/Monad/IO.purs
+++ b/src/Control/Monad/IO.purs
@@ -11,8 +11,8 @@ import Prelude
 
 import Control.Alt (class Alt)
 import Control.Alternative (class Alternative)
-import Control.Monad.Aff (Aff, ParAff(..), launchAff)
-import Control.Monad.Aff.Class (class MonadAff, liftAff)
+import Control.Monad.Aff (Aff, ParAff, launchAff)
+import Control.Monad.Aff.Class (class MonadAff)
 import Control.Monad.Aff.Unsafe (unsafeCoerceAff)
 import Control.Monad.Eff.Class (class MonadEff, liftEff)
 import Control.Monad.Eff.Exception (Error)
@@ -26,7 +26,6 @@ import Control.Parallel (class Parallel, parallel, sequential)
 import Control.Plus (class Plus)
 import Data.Monoid (class Monoid)
 import Data.Newtype (class Newtype, unwrap, wrap)
-import Prelude
 
 newtype IO a = IO (Aff (infinity :: INFINITY) a)
 
@@ -62,8 +61,8 @@ instance monadAffIO :: MonadAff eff IO where
   liftAff = wrap <<< unsafeCoerceAff
 
 instance parallelParIO :: Parallel ParIO IO where
-  parallel = ParIO <<< ParAff <<< runIO
-  sequential (ParIO (ParAff ma)) = IO ma
+  parallel = ParIO <<< parallel <<< runIO
+  sequential (ParIO ma) = IO $ sequential ma
 
 instance monadEffIO :: MonadEff eff IO where
   liftEff = wrap <<< liftEff <<< unsafeCoerceEff
@@ -76,6 +75,6 @@ derive newtype instance altIO :: Alt IO
 
 derive newtype instance plusIO :: Plus IO
 
-derive newtype instance alternativeIO :: Alternative IO
+instance alternativeIO :: Alternative IO
 
-derive newtype instance monadZeroIO :: MonadZero IO
+instance monadZeroIO :: MonadZero IO