binding-core-0.2.2: Data Binding

Safe HaskellSafe-Inferred

Data.Binding.List

Synopsis

Documentation

data BindingList v a Source

Binding List

Instances

Variable v => Variable (BindingList v)

interface to the binding list's Source

Variable v => Bindable (BindingList v) 

toBindingList :: Variable v => [a] -> IO (BindingList v a)Source

Create a binding list.

fromBindingList :: Variable v => BindingList v a -> IO [a]Source

Extract the data from a binding list.

length :: Variable v => BindingList v a -> IO IntSource

The size of a binding list.

position :: Variable v => BindingList v a -> IO IntSource

Get the current position.

seek :: Variable v => BindingList v a -> Int -> IO IntSource

Bind to a new position in a binding list. Returns the new position; this is convenient for seekBy and friends.

seekBy :: Variable v => (Int -> Int) -> BindingList v a -> IO IntSource

Bind to a new position in a binding list.

next :: Variable v => BindingList v a -> IO IntSource

Bind to the next item in a binding list.

prev :: Variable v => BindingList v a -> IO IntSource

Bind to the previous item in a binding list.

remove' :: [a] -> Int -> [a]Source

Remove an element from a list.

remove :: BindingList v a -> IO IntSource

Remove the current element from the list.

insert' :: [a] -> Int -> a -> [a]Source

Insert an element into a list.

insert :: BindingList v a -> a -> IO IntSource

Insert an element into the list. The new element is inserted after the current element. This allows appending, but precludes prepending.