Skip to content
Logo

Process

E.Process is what the running process knows about its environment: cwd(), home() and argv() today, with environment variables to follow. The directories return an E.Path, argv() a tuple[str, ...] without the program name. It is an explicit requirement like the FileSystem, so a CLI reads its starting directory through it and a test pins that directory with E.Process.Test(current_directory=..., home_directory=..., arguments=...) instead of depending on where pytest happens to run.

def [, : E., ](
    : [[E.], E.[, , ]],
) -> E.[, ,  | E.Process.]:
    return E.(E.Process.).(lambda : .()).()
 
 
E.(
    ()
    .(E.Process.)(E.Process.())
    .(E.FileSystem.)(E.FileSystem.())
)