Portability | not portable |
---|---|
Stability | experimental |
Maintainer | Uwe Schmidt (uwe@fh-wedel.de) |
Safe Haskell | Safe-Inferred |
A simplified version of StringMap for implementing sets.
There is one important difference to the StringMap implementation: The fields are not marked to be strict. This enables building the set on the fly.
This feature is used in fuzzy search, when an index tree is restricted to a set of keys, e.g. the set of all none case significant keys
- data StringSet
- emptyPS :: StringSet
- elemPS :: StringSet -> StringSet
- elem0PS :: StringSet
- nextPS :: Sym -> StringSet -> StringSet -> StringSet
- lastPS :: Sym -> StringSet -> StringSet
- nullPS :: StringSet -> Bool
- singlePS :: Key -> StringSet
- prefixPS :: Key -> StringSet
- unionPS :: StringSet -> StringSet -> StringSet
- foldPS :: (Key -> b -> b) -> b -> (Key -> Key) -> StringSet -> b
- foldWithKeyPS :: (Key -> b -> b) -> b -> StringSet -> b
- elemsPS :: StringSet -> [Key]
- fuzzyCharPS :: (Sym -> [Sym]) -> StringSet -> StringSet
- fuzzyCharsPS :: (Sym -> [Key]) -> StringSet -> StringSet
Documentation
Set of strings implemented as lazy prefix tree.
type StringSet = StringMap ()
is not feasable because of
the strict fields in the StringMap definition
foldWithKeyPS :: (Key -> b -> b) -> b -> StringSet -> bSource