polysemy-process-0.9.0.0: Polysemy effects for system processes
Safe HaskellSafe-Inferred
LanguageHaskell2010

Polysemy.Process.Effect.Pty

Description

 
Synopsis

Documentation

newtype Rows Source #

Horizontal size of a pseudo terminal in characters.

Constructors

Rows 

Fields

Instances

Instances details
Enum Rows Source # 
Instance details

Defined in Polysemy.Process.Effect.Pty

Methods

succ :: Rows -> Rows #

pred :: Rows -> Rows #

toEnum :: Int -> Rows #

fromEnum :: Rows -> Int #

enumFrom :: Rows -> [Rows] #

enumFromThen :: Rows -> Rows -> [Rows] #

enumFromTo :: Rows -> Rows -> [Rows] #

enumFromThenTo :: Rows -> Rows -> Rows -> [Rows] #

Generic Rows Source # 
Instance details

Defined in Polysemy.Process.Effect.Pty

Associated Types

type Rep Rows :: Type -> Type #

Methods

from :: Rows -> Rep Rows x #

to :: Rep Rows x -> Rows #

Num Rows Source # 
Instance details

Defined in Polysemy.Process.Effect.Pty

Methods

(+) :: Rows -> Rows -> Rows #

(-) :: Rows -> Rows -> Rows #

(*) :: Rows -> Rows -> Rows #

negate :: Rows -> Rows #

abs :: Rows -> Rows #

signum :: Rows -> Rows #

fromInteger :: Integer -> Rows #

Integral Rows Source # 
Instance details

Defined in Polysemy.Process.Effect.Pty

Methods

quot :: Rows -> Rows -> Rows #

rem :: Rows -> Rows -> Rows #

div :: Rows -> Rows -> Rows #

mod :: Rows -> Rows -> Rows #

quotRem :: Rows -> Rows -> (Rows, Rows) #

divMod :: Rows -> Rows -> (Rows, Rows) #

toInteger :: Rows -> Integer #

Real Rows Source # 
Instance details

Defined in Polysemy.Process.Effect.Pty

Methods

toRational :: Rows -> Rational #

Show Rows Source # 
Instance details

Defined in Polysemy.Process.Effect.Pty

Methods

showsPrec :: Int -> Rows -> ShowS #

show :: Rows -> String #

showList :: [Rows] -> ShowS #

Eq Rows Source # 
Instance details

Defined in Polysemy.Process.Effect.Pty

Methods

(==) :: Rows -> Rows -> Bool #

(/=) :: Rows -> Rows -> Bool #

Ord Rows Source # 
Instance details

Defined in Polysemy.Process.Effect.Pty

Methods

compare :: Rows -> Rows -> Ordering #

(<) :: Rows -> Rows -> Bool #

(<=) :: Rows -> Rows -> Bool #

(>) :: Rows -> Rows -> Bool #

(>=) :: Rows -> Rows -> Bool #

max :: Rows -> Rows -> Rows #

min :: Rows -> Rows -> Rows #

type Rep Rows Source # 
Instance details

Defined in Polysemy.Process.Effect.Pty

type Rep Rows = D1 ('MetaData "Rows" "Polysemy.Process.Effect.Pty" "polysemy-process-0.9.0.0-4Z3jUzSSkAQ1Ki7YnL0qsO" 'True) (C1 ('MetaCons "Rows" 'PrefixI 'True) (S1 ('MetaSel ('Just "unRows") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)))

newtype Cols Source #

Vertical size of a pseudo terminal in characters.

Constructors

Cols 

Fields

Instances

Instances details
Enum Cols Source # 
Instance details

Defined in Polysemy.Process.Effect.Pty

Methods

succ :: Cols -> Cols #

pred :: Cols -> Cols #

toEnum :: Int -> Cols #

fromEnum :: Cols -> Int #

enumFrom :: Cols -> [Cols] #

enumFromThen :: Cols -> Cols -> [Cols] #

enumFromTo :: Cols -> Cols -> [Cols] #

enumFromThenTo :: Cols -> Cols -> Cols -> [Cols] #

Generic Cols Source # 
Instance details

Defined in Polysemy.Process.Effect.Pty

Associated Types

type Rep Cols :: Type -> Type #

Methods

from :: Cols -> Rep Cols x #

to :: Rep Cols x -> Cols #

Num Cols Source # 
Instance details

Defined in Polysemy.Process.Effect.Pty

Methods

(+) :: Cols -> Cols -> Cols #

(-) :: Cols -> Cols -> Cols #

(*) :: Cols -> Cols -> Cols #

negate :: Cols -> Cols #

abs :: Cols -> Cols #

signum :: Cols -> Cols #

fromInteger :: Integer -> Cols #

Integral Cols Source # 
Instance details

Defined in Polysemy.Process.Effect.Pty

Methods

quot :: Cols -> Cols -> Cols #

rem :: Cols -> Cols -> Cols #

div :: Cols -> Cols -> Cols #

mod :: Cols -> Cols -> Cols #

quotRem :: Cols -> Cols -> (Cols, Cols) #

divMod :: Cols -> Cols -> (Cols, Cols) #

toInteger :: Cols -> Integer #

Real Cols Source # 
Instance details

Defined in Polysemy.Process.Effect.Pty

Methods

toRational :: Cols -> Rational #

Show Cols Source # 
Instance details

Defined in Polysemy.Process.Effect.Pty

Methods

showsPrec :: Int -> Cols -> ShowS #

show :: Cols -> String #

showList :: [Cols] -> ShowS #

Eq Cols Source # 
Instance details

Defined in Polysemy.Process.Effect.Pty

Methods

(==) :: Cols -> Cols -> Bool #

(/=) :: Cols -> Cols -> Bool #

Ord Cols Source # 
Instance details

Defined in Polysemy.Process.Effect.Pty

Methods

compare :: Cols -> Cols -> Ordering #

(<) :: Cols -> Cols -> Bool #

(<=) :: Cols -> Cols -> Bool #

(>) :: Cols -> Cols -> Bool #

(>=) :: Cols -> Cols -> Bool #

max :: Cols -> Cols -> Cols #

min :: Cols -> Cols -> Cols #

type Rep Cols Source # 
Instance details

Defined in Polysemy.Process.Effect.Pty

type Rep Cols = D1 ('MetaData "Cols" "Polysemy.Process.Effect.Pty" "polysemy-process-0.9.0.0-4Z3jUzSSkAQ1Ki7YnL0qsO" 'True) (C1 ('MetaCons "Cols" 'PrefixI 'True) (S1 ('MetaSel ('Just "unCols") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)))

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.

Instances

Instances details
type DefiningModule Pty Source # 
Instance details

Defined in Polysemy.Process.Effect.Pty

type DefiningModule Pty = "Polysemy.Process.Effect.Pty"

withPty :: forall resource r. Member (Scoped resource Pty) r => InterpreterFor Pty r Source #

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