diff --git a/src/Effect/Aff.purs b/src/Effect/Aff.purs index 0249e6e..6dbef67 100644 --- a/src/Effect/Aff.purs +++ b/src/Effect/Aff.purs @@ -27,6 +27,7 @@ module Effect.Aff , generalBracket , nonCanceler , effectCanceler + , fiberCanceler , module Exports ) where @@ -206,6 +207,10 @@ nonCanceler = Canceler (const (pure unit)) effectCanceler ∷ Effect Unit → Canceler effectCanceler = Canceler <<< const <<< liftEffect +-- | A canceler from a Fiber. +fiberCanceler ∷ ∀ a. Fiber a → Canceler +fiberCanceler = Canceler <<< flip killFiber + -- | Forks an `Aff` from an `Effect` context, returning the `Fiber`. launchAff ∷ ∀ a. Aff a → Effect (Fiber a) launchAff aff = do