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