Safe Haskell | Safe-Inferred |
---|
- module Data.Binding.Simple
- data BindingList v a
- toBindingList :: Variable v => [a] -> IO (BindingList v a)
- fromBindingList :: Variable v => BindingList v a -> IO [a]
- length :: Variable v => BindingList v a -> IO Int
- position :: Variable v => BindingList v a -> IO Int
- seek :: Variable v => BindingList v a -> Int -> IO Int
- seekBy :: Variable v => (Int -> Int) -> BindingList v a -> IO Int
- next :: Variable v => BindingList v a -> IO Int
- prev :: Variable v => BindingList v a -> IO Int
- remove' :: [a] -> Int -> [a]
- remove :: BindingList v a -> IO Int
- insert' :: [a] -> Int -> a -> [a]
- insert :: BindingList v a -> a -> IO Int
Documentation
module Data.Binding.Simple
data BindingList v a Source
Binding List
Variable v => Variable (BindingList v) | interface to the binding list's |
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.
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.
remove :: BindingList v a -> IO IntSource
Remove the current element from the 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.