hs-term-emulator-0.1.0.4: Terminal Emulator written in 100% Haskell
Safe HaskellNone
LanguageHaskell2010

System.Terminal.Emulator.TermLines

Synopsis

Documentation

type TermLines = StrictSeq TermLine Source #

empty :: StrictSeq a Source #

The empty sequence.

length :: StrictSeq a -> Int Source #

The number of elements in the sequence.

singleton :: a -> StrictSeq a Source #

replicate :: Int -> a -> StrictSeq a Source #

replicate n x is a sequence consisting of n copies of x.

vIndex :: Int -> Lens' (StrictSeq a) a Source #

A lens to the specified index of the sequence. Must be in range.

head :: StrictSeq a -> a Source #

First element. Must be nonempty

last :: StrictSeq a -> a Source #

Last element. Must be nonempty

take :: Int -> StrictSeq a -> StrictSeq a Source #

The first i elements of a sequence. If i is negative, take i s yields the empty sequence. If the sequence contains fewer than i elements, the whole sequence is returned.

takeLast :: Int -> StrictSeq a -> StrictSeq a Source #

The last i elements of a sequence. If i is negative, takeLast i s yields the empty sequence. If the sequence contains fewer than i elements, the whole sequence is returned.

drop :: Int -> StrictSeq a -> StrictSeq a Source #

Elements of a sequence after the first i. If i is negative, drop i s yields the whole sequence. If the sequence contains fewer than i elements, the empty sequence is returned.

dropLast :: Int -> StrictSeq a -> StrictSeq a Source #

Elements of a sequence after the first i last elements. If i is negative, dropLast i s yields the whole sequence. If the sequence contains fewer than i elements, the empty sequence is returned.

traverseWithIndex :: Applicative f => (Int -> a -> f b) -> StrictSeq a -> f (StrictSeq b) Source #

traverseWithIndex is a version of traverse that also offers access to the index of each element.

toSeq :: StrictSeq a -> Seq a Source #