| hxt-8.5.2: A collection of tools for processing XML with Haskell. | Source code | Contents | Index

Data.AssocList

Description
simple key value assocciation list implemented as unordered list of pairs Version : $Id: AssocList.hs,v 1.2 20050527 13:15:23 hxml Exp $
Synopsis

type AssocList k v = [(k, v)]
lookupDef :: Eq k => v -> k -> AssocList k v -> v
lookup1 :: Eq k => k -> AssocList k [e] -> [e]
hasEntry :: Eq k => k -> AssocList k v -> Bool
addEntry :: Eq k => k -> v -> AssocList k v -> AssocList k v
addEntries :: Eq k => AssocList k v -> AssocList k v -> AssocList k v
delEntry :: Eq k => k -> AssocList k v -> AssocList k v
delEntries :: Eq k => [k] -> AssocList k v -> AssocList k v

Documentation

type AssocList k v = [(k, v)] | Source

lookupDef :: Eq k => v -> k -> AssocList k v -> v | Source

lookup with default value

lookup1 :: Eq k => k -> AssocList k [e] -> [e] | Source

lookup with empty list (empty string) as default value

hasEntry :: Eq k => k -> AssocList k v -> Bool | Source

test for existence of a key

addEntry :: Eq k => k -> v -> AssocList k v -> AssocList k v | Source

add an entry, remove an existing entry before adding the new one at the top of the list, addEntry is strict

addEntries :: Eq k => AssocList k v -> AssocList k v -> AssocList k v | Source

add a whole list of entries with `addEntry`

delEntry :: Eq k => k -> AssocList k v -> AssocList k v | Source

delete an entry, delEntry is strict

delEntries :: Eq k => [k] -> AssocList k v -> AssocList k v | Source

delete a list of entries with `delEntry`
Produced by Haddock version 2.4.2