flix

0.56.0

ProcessWithResult

eff ProcessWithResultSource

An effect used to start a process outside the JVM.

Operations

def execWithCwdAndEnv(cmd: String, args: List[String], cwd: Option[String], env: Map[String, String]): Result[IoError, ProcessHandle] Source

Immediately executes the command cmd with the arguments args, by the path cwd and with the environmental env.

Definitions

def exec(cmd: String, args: List[String]): Result[IoError, ProcessHandle] \ ProcessWithResult Source

Executes the command cmd with the arguments args.

def execWithCwd(cmd: String, args: List[String], cwd: Option[String]): Result[IoError, ProcessHandle] \ ProcessWithResult Source

Executes the command cmd with the arguments args, by the path cwd.

def execWithEnv(cmd: String, args: List[String], env: Map[String, String]): Result[IoError, ProcessHandle] \ ProcessWithResult Source

Executes the command cmd with the arguments args and with the environmental env.

def handle(f: a -> b \ ef): a -> b \ (ef - ProcessWithResult) + Exec + IO Source

Handles the ProcessWithResult effect of the given function f.

In other words, re-interprets the ProcessWithResult effect using the Exec effect.

def runWithIO(f: Unit -> a \ ef): a \ (ef - ProcessWithResult) + Exec + IO Source

Runs the Process effect of the given function f.

In other words, re-interprets the Process effect using the Exec effect.