Skip to content

Commit e289d31

Browse files
Allow launchAff to bind with runAff_ throwException
1 parent 4ab4eb7 commit e289d31

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/Control/Monad/Aff.purs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,8 @@ cancelWith aff c = runFn3 _cancelWith nonCanceler aff c
7373
-- | If you do need to handle exceptions, you can use `runAff` instead, or
7474
-- | you can handle the exception within the Aff computation, using
7575
-- | `catchError` (or any of the other mechanisms).
76-
launchAff :: forall e a. Aff e a -> Eff (err :: EXCEPTION | e) Unit
77-
launchAff = runAff throwException (const (pure unit)) <<< liftEx
78-
where
79-
liftEx :: Aff e a -> Aff (err :: EXCEPTION | e) a
80-
liftEx = _unsafeInterleaveAff
76+
launchAff :: forall e a. Aff (err :: EXCEPTION | e) a -> Eff (err :: EXCEPTION | e) Unit
77+
launchAff = runAff_ throwException (const (pure unit))
8178

8279
-- | Runs the asynchronous computation. You must supply an error callback and a
8380
-- | success callback.

0 commit comments

Comments
 (0)