Skip to content

Commit 0afa65a

Browse files
committed
add MonadAff type class
1 parent afd67da commit 0afa65a

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

MODULES.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,24 @@ instance monadPlusAff :: MonadPlus (Aff e)
190190

191191

192192

193+
## Module Control.Monad.Aff.Class
194+
195+
#### `MonadAff`
196+
197+
``` purescript
198+
class MonadAff e m where
199+
liftAff :: forall a. Aff e a -> m a
200+
```
201+
202+
203+
#### `monadAffAff`
204+
205+
``` purescript
206+
instance monadAffAff :: MonadAff e (Aff e)
207+
```
208+
209+
210+
193211
## Module Control.Monad.Aff.Unsafe
194212

195213
#### `unsafeInterleaveAff`

src/Control/Monad/Aff/Class.purs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module Control.Monad.Aff.Class where
2+
import Control.Monad.Aff
3+
4+
class MonadAff e m where
5+
liftAff :: forall a. Aff e a -> m a
6+
7+
instance monadAffAff :: MonadAff e (Aff e) where
8+
liftAff = id

0 commit comments

Comments
 (0)