aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/PursLoader/ChildProcess.purs
diff options
context:
space:
mode:
Diffstat (limited to 'src/PursLoader/ChildProcess.purs')
-rw-r--r--src/PursLoader/ChildProcess.purs23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/PursLoader/ChildProcess.purs b/src/PursLoader/ChildProcess.purs
new file mode 100644
index 0000000..3bd960b
--- /dev/null
+++ b/src/PursLoader/ChildProcess.purs
@@ -0,0 +1,23 @@
1module PursLoader.ChildProcess
2 ( ChildProcess()
3 , spawn
4 ) where
5
6import Prelude (Unit(), ($))
7
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
16spawn :: forall eff. String -> Array String -> Aff (cp :: ChildProcess | eff) String
17spawn command args = makeAff $ runFn4 spawnFn command args
18
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)