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

Commit ea2e9c4

Browse files
authored
Merge pull request #5 from TinkerTravel/master
Update for PureScript 0.11
2 parents ca40f90 + 629f9b3 commit ea2e9c4

File tree

4 files changed

+18
-12
lines changed

4 files changed

+18
-12
lines changed

bower.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@
77
"output"
88
],
99
"dependencies": {
10-
"purescript-aff": "^2.0.3",
11-
"purescript-control": "^2.0.0",
12-
"purescript-eff": "^2.0.0",
13-
"purescript-exceptions": "^2.0.0",
14-
"purescript-monoid": "^2.2.0",
15-
"purescript-newtype": "^1.3.0",
16-
"purescript-prelude": "^2.5.0",
17-
"purescript-tailrec": "^2.0.2",
18-
"purescript-transformers": "^2.3.0"
10+
"purescript-aff": "^3.0.0",
11+
"purescript-control": "^3.0.0",
12+
"purescript-eff": "^3.1.0",
13+
"purescript-exceptions": "^3.0.0",
14+
"purescript-monoid": "^3.0.0",
15+
"purescript-newtype": "^2.0.0",
16+
"purescript-prelude": "^3.0.0",
17+
"purescript-tailrec": "^3.1.0",
18+
"purescript-transformers": "^3.2.0"
1919
},
2020
"devDependencies": {
21-
"purescript-psci-support": "^2.0.0"
21+
"purescript-psci-support": "^3.0.0"
2222
}
2323
}

src/Control/Monad/IO.purs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import Control.Monad.Aff.Unsafe (unsafeCoerceAff)
1414
import Control.Monad.Eff.Class (class MonadEff, liftEff)
1515
import Control.Monad.Eff.Exception (Error)
1616
import Control.Monad.Eff.Unsafe (unsafeCoerceEff)
17-
import Control.Monad.Error.Class (class MonadError)
17+
import Control.Monad.Error.Class (class MonadError, class MonadThrow)
1818
import Control.Monad.IO.Effect (INFINITY)
1919
import Control.Monad.IOSync (IOSync)
2020
import Control.Monad.Rec.Class (class MonadRec)
@@ -55,6 +55,8 @@ instance monadAffIO :: MonadAff eff IO where
5555
instance monadEffIO :: MonadEff eff IO where
5656
liftEff = wrap <<< liftEff <<< unsafeCoerceEff
5757

58+
derive newtype instance monadThrowIO :: MonadThrow Error IO
59+
5860
derive newtype instance monadErrorIO :: MonadError Error IO
5961

6062
derive newtype instance altIO :: Alt IO

src/Control/Monad/IO/Effect.purs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@ module Control.Monad.IO.Effect
22
( INFINITY
33
) where
44

5+
import Control.Monad.Eff (kind Effect)
6+
57
foreign import data INFINITY :: Effect

src/Control/Monad/IOSync.purs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import Control.Monad.Eff (Eff)
1111
import Control.Monad.Eff.Class (class MonadEff, liftEff)
1212
import Control.Monad.Eff.Exception (Error, catchException, error, throwException)
1313
import Control.Monad.Eff.Unsafe (unsafeCoerceEff)
14-
import Control.Monad.Error.Class (class MonadError, catchError, throwError)
14+
import Control.Monad.Error.Class (class MonadError, class MonadThrow, catchError, throwError)
1515
import Control.Monad.IO.Effect (INFINITY)
1616
import Control.Monad.Rec.Class (class MonadRec)
1717
import Control.MonadZero (class MonadZero)
@@ -50,6 +50,8 @@ instance monadEffIOSync :: MonadEff eff IOSync where
5050
instance monadErrorIOSync :: MonadError Error IOSync where
5151
catchError a k = liftEff $
5252
catchException (\e -> unwrap $ k e) (unsafeCoerceEff $ unwrap a)
53+
54+
instance monadThrowIOSync :: MonadThrow Error IOSync where
5355
throwError = liftEff <<< throwException
5456

5557
instance altIOSync :: Alt IOSync where

0 commit comments

Comments
 (0)