Skip to content
This repository has been archived by the owner on Jan 17, 2020. It is now read-only.

Commit

Permalink
Merge pull request #8 from justinwoo/aff-4.0
Browse files Browse the repository at this point in the history
Upgrade to Aff 4.0
  • Loading branch information
jdegoes authored Oct 2, 2017
2 parents da1a00a + fa1dd6c commit 14c1b59
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
12 changes: 6 additions & 6 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
13 changes: 6 additions & 7 deletions src/Control/Monad/IO.purs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)

Expand Down Expand Up @@ -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
Expand All @@ -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

0 comments on commit 14c1b59

Please sign in to comment.