polysemy-process-0.13.0.1: Polysemy effects for system processes
Safe HaskellSafe-Inferred
LanguageGHC2021

Polysemy.Process.Pty

Description

The effect Pty abstracts pseudo terminals.

Synopsis

Documentation

data Pty :: Effect where Source #

A pseudo terminal, to be scoped with withPty.

Constructors

Handle :: Pty m Handle

The file descriptor that can be connected to stdio of a process.

Resize :: Rows -> Cols -> Pty m ()

Set the size of the terminal.

Size :: Pty m (Rows, Cols)

Get the size of the terminal.

resize :: forall r. Member Pty r => Rows -> Cols -> Sem r () Source #

Set the size of the terminal.

handle :: forall r. Member Pty r => Sem r Handle Source #

The file descriptor that can be connected to stdio of a process.

size :: forall r. Member Pty r => Sem r (Rows, Cols) Source #

Get the size of the terminal.

withPty :: Member (Scoped_ Pty) r => InterpreterFor Pty r Source #

Bracket an action with the creation and destruction of a pseudo terminal.