This repository was archived by the owner on Jan 17, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 11module Control.Monad.IO
22 ( module Control.Monad.IO.Effect
33 , IO (..)
4+ , runIO
5+ , runIO'
46 , launchIO
57 ) where
68
@@ -24,6 +26,12 @@ import Prelude
2426
2527newtype IO a = IO (Aff (infinity :: INFINITY ) a )
2628
29+ runIO :: IO ~> Aff (infinity :: INFINITY )
30+ runIO = unwrap
31+
32+ runIO' :: ∀ eff . IO ~> Aff (infinity :: INFINITY | eff )
33+ runIO' = unsafeCoerceAff <<< unwrap
34+
2735launchIO :: ∀ a . IO a -> IOSync Unit
2836launchIO = void <<< liftEff <<< launchAff <<< unwrap
2937
Original file line number Diff line number Diff line change 11module Control.Monad.IOSync
22 ( module Control.Monad.IO.Effect
33 , IOSync (..)
4+ , runIOSync
5+ , runIOSync'
46 ) where
57
68import Control.Alt (class Alt )
@@ -20,6 +22,12 @@ import Prelude
2022
2123newtype IOSync a = IOSync (Eff (infinity :: INFINITY ) a )
2224
25+ runIOSync :: IOSync ~> Eff (infinity :: INFINITY )
26+ runIOSync = unwrap
27+
28+ runIOSync' :: ∀ eff . IOSync ~> Eff (infinity :: INFINITY | eff )
29+ runIOSync' = unsafeCoerceEff <<< unwrap
30+
2331derive instance newtypeIOSync :: Newtype (IOSync a ) _
2432
2533derive newtype instance functorIOSync :: Functor IOSync
You can’t perform that action at this time.
0 commit comments