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
100100pid = _.pid <<< runChildProcess
101101
102102connected :: forall eff . ChildProcess -> Eff (cp :: CHILD_PROCESS | eff ) Boolean
103- connected = pure <<< _.connected <<< runChildProcess
103+ connected ( ChildProcess cp) = mkEff \_ -> cp.connected
104104
105105send :: 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
107107
108108disconnect :: forall eff . ChildProcess -> Eff (cp :: CHILD_PROCESS | eff ) Unit
109109disconnect = _.disconnect <<< runChildProcess
@@ -112,7 +112,10 @@ disconnect = _.disconnect <<< runChildProcess
112112-- | that this function is called "kill", as sending a signal to a child
113113-- | process won't necessarily kill it.
114114kill :: 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
116119
117120-- | Specifies how a child process exited; normally (with an exit code), or
118121-- | due to a signal.
You can’t perform that action at this time.
0 commit comments