Copyright | (C) 2016 Rev. Johnny Healey |
---|---|
License | LGPL-3 |
Maintainer | Rev. Johnny Healey <rev.null@gmail.com> |
Stability | experimental |
Portability | unknown |
Safe Haskell | None |
Language | Haskell2010 |
This is a data type that can be used with a FixFile
to store a set of
Ordered
items as an unbalanced binary tree. This file is not recommended
for use, but exists for educational purposes. It has a simple
implementation that is easier to read than some of the more advanced
balanced data types.
- data Set i a
- createSetFile :: (Binary i, Typeable i) => FilePath -> IO (FixFile (Ref (Set i)))
- openSetFile :: (Binary i, Typeable i) => FilePath -> IO (FixFile (Ref (Set i)))
- empty :: Fixed g => g (Set i)
- insertSet :: (Ord i, Fixed g) => i -> g (Set i) -> g (Set i)
- insertSetT :: (Ord i, Binary i) => i -> Transaction (Ref (Set i)) s ()
- deleteSet :: (Ord i, Fixed g) => i -> g (Set i) -> g (Set i)
- deleteSetT :: (Ord i, Binary i) => i -> Transaction (Ref (Set i)) s ()
- lookupSet :: (Ord i, Fixed g) => i -> g (Set i) -> Bool
- lookupSetT :: (Ord i, Binary i) => i -> Transaction (Ref (Set i)) s Bool
- toListSet :: Fixed g => g (Set i) -> [i]
- toListSetT :: Binary i => Transaction (Ref (Set i)) s [i]
Documentation
insertSetT :: (Ord i, Binary i) => i -> Transaction (Ref (Set i)) s () Source
Transaction
version of insertSet
.
deleteSetT :: (Ord i, Binary i) => i -> Transaction (Ref (Set i)) s () Source
Transaction
version of deleteSet
.
lookupSet :: (Ord i, Fixed g) => i -> g (Set i) -> Bool Source
Predicate to lookup an item from a
.Set
i
lookupSetT :: (Ord i, Binary i) => i -> Transaction (Ref (Set i)) s Bool Source
FTransaction
version of lookupSet
.
toListSetT :: Binary i => Transaction (Ref (Set i)) s [i] Source
Transaction
version of toListSet
.