@@ -71,23 +71,27 @@ import System.Process.Typed as Reexport hiding
71
71
import Data.ByteString.Lazy (ByteString )
72
72
import qualified System.Process.Typed as PT
73
73
74
- import Effectful.Internal.Effect
75
- import Effectful.Internal.Monad
76
- import Effectful (Dispatch (.. ), DispatchOf )
77
- import Effectful.Dispatch.Static (SideEffects (.. ))
74
+ import Effectful
75
+ import qualified Effectful.Process
76
+ import Effectful.Dispatch.Static
78
77
79
78
#if ! MIN_VERSION_typed_process(0,2,8)
80
79
import System.Exit (ExitCode (.. ))
81
80
#endif
82
81
83
- -- | An effect for running child processes using the @typed-process@ library.
84
- data TypedProcess :: Effect
82
+ ----------------------------------------
83
+ -- Effect & Handler
85
84
86
- type instance DispatchOf TypedProcess = 'Static 'WithSideEffects
87
- data instance StaticRep TypedProcess = TypedProcess
85
+ -- | We provide a type synonym for the 'Effectful.Process.Process' effect since
86
+ -- it clashes with 'PT.Process' type of @typed-process@.
87
+ type TypedProcess = Effectful.Process. Process
88
88
89
+ -- | This is merely an alias for 'Effectful.Process.runProcess' since that name
90
+ -- clashes with 'runProcess', i.e.:
91
+ --
92
+ -- > runTypedProcess = Effectful.Process.runProcess
89
93
runTypedProcess :: IOE :> es => Eff (TypedProcess : es ) a -> Eff es a
90
- runTypedProcess = evalStaticRep TypedProcess
94
+ runTypedProcess = Effectful.Process. runProcess
91
95
92
96
----------------------------------------
93
97
-- Launch a process
0 commit comments