Hsed-0.2.1: Stream Editor in Haskell

Portabilitynon-portable
Stabilityexperimental
Maintainervirukav@gmail.com

Hsed.SedState

Description

The state of the program

Documentation

data Env Source

Constructors

Env 

Fields

ast_ :: [SedCmd]

Parsed Sed commands

defOutput_ :: !Bool

Suppress the default output

lastLine_ :: !Int

The last line index

curLine_ :: !Int

The current line index

inRange_ :: !Bool

Is pattern space matches the address range

patternSpace_ :: !ByteString

The buffer to keep the selected line(s)

holdSpace_ :: !ByteString

The buffer to keep the line(s) temporarily

appendSpace_ :: [ByteString]

The buffer to keep the append lines

memorySpace_ :: !ByteString

Store the output in the memory

useMemSpace_ :: !Bool

If True the Sed output is stored in the memory buffer

exit_ :: !Bool

Exit the stream editor

fileout_ :: [(FilePath, Handle)]

Write (w command) files handles

subst_ :: !Bool

The result of the last substitution

curFile_ :: (Handle, Bool)

Current input file handle

Instances

set :: T Env a -> a -> SedState ()Source

modify :: T Env a -> (a -> a) -> SedState ()Source