]> git.immae.eu Git - github/fretlink/purs-loader.git/blame - src/PursLoader/ChildProcess.purs
PureScript 0.7 updates and migration to pulp
[github/fretlink/purs-loader.git] / src / PursLoader / ChildProcess.purs
CommitLineData
c194f84c 1module PursLoader.ChildProcess
2 ( ChildProcess()
3 , spawn
4 ) where
5
03b840cb 6import Prelude (Unit(), ($))
7
c194f84c 8import Control.Monad.Aff (Aff(), makeAff)
9import Control.Monad.Eff (Eff())
10import Control.Monad.Eff.Exception (Error())
11
12import Data.Function
13
14foreign import data ChildProcess :: !
15
03b840cb 16spawn :: forall eff. String -> Array String -> Aff (cp :: ChildProcess | eff) String
c194f84c 17spawn command args = makeAff $ runFn4 spawnFn command args
18
03b840cb 19foreign import spawnFn :: forall eff. Fn4 String
20 (Array String)
21 (Error -> Eff (cp :: ChildProcess | eff) Unit)
22 (String -> Eff (cp :: ChildProcess | eff) Unit)
23 (Eff (cp :: ChildProcess | eff) Unit)