File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -100,10 +100,10 @@ pid :: ChildProcess -> Pid
100
100
pid = _.pid <<< runChildProcess
101
101
102
102
connected :: forall eff . ChildProcess -> Eff (cp :: CHILD_PROCESS | eff ) Boolean
103
- connected = pure <<< _.connected <<< runChildProcess
103
+ connected ( ChildProcess cp) = mkEff \_ -> cp.connected
104
104
105
105
send :: forall eff props . { | props } -> Handle -> ChildProcess -> Eff (cp :: CHILD_PROCESS | eff ) Boolean
106
- send msg handle (ChildProcess cp) = pure ( runFn2 cp.send msg handle)
106
+ send msg handle (ChildProcess cp) = mkEff \_ -> runFn2 cp.send msg handle
107
107
108
108
disconnect :: forall eff . ChildProcess -> Eff (cp :: CHILD_PROCESS | eff ) Unit
109
109
disconnect = _.disconnect <<< runChildProcess
@@ -112,7 +112,10 @@ disconnect = _.disconnect <<< runChildProcess
112
112
-- | that this function is called "kill", as sending a signal to a child
113
113
-- | process won't necessarily kill it.
114
114
kill :: forall eff . Signal -> ChildProcess -> Eff (cp :: CHILD_PROCESS | eff ) Boolean
115
- kill sig (ChildProcess cp) = pure (cp.kill (Signal .toString sig))
115
+ kill sig (ChildProcess cp) = mkEff \_ -> cp.kill (Signal .toString sig)
116
+
117
+ mkEff :: forall eff a . (Unit -> a ) -> Eff eff a
118
+ mkEff = unsafeCoerce
116
119
117
120
-- | Specifies how a child process exited; normally (with an exit code), or
118
121
-- | due to a signal.
You can’t perform that action at this time.
0 commit comments