Module HTML.CategorizedList

This library provides functions to categorize a list of entities into a HTML page with an index access (e.g., "A-Z") to these entities.

Summary of exported operations:

list2CategorizedHtml :: (HTML a, Show b) => [(c,[a])] -> [(b,String)] -> (c -> b -> Bool) -> [a]   
General categorization of a list of entries.
categorizeByItemKey :: HTML a => [(String,[a])] -> [a]   
Categorize a list of entries with respect to the inial keys.
stringList2ItemList :: HTML a => [String] -> [(String,[a])]   
Convert a string list into an key-item list The strings are used as keys and for the simple text layout.

Exported operations:

list2CategorizedHtml :: (HTML a, Show b) => [(c,[a])] -> [(b,String)] -> (c -> b -> Bool) -> [a]   

General categorization of a list of entries.

The item will occur in every category for which the boolean function categoryFun yields True.

Example call:
(list2CategorizedHtml itemL categoryL categoryFun)
Parameters:
  • itemL : the list of key-item pairs which are supposed to be categorized with respect to key
  • categoryL : list of key-category pairs to which the items can be sorted in
  • categoryFun : uses the keys of the items and the keys of the categories to distribute the items among the categories.
Returns:
Html containing inner links between the categories

categorizeByItemKey :: HTML a => [(String,[a])] -> [a]   

Categorize a list of entries with respect to the inial keys.

The categories are named as all initial characters of the keys of the items.

Example call:
(categorizeByItemKey itemL)
Parameters:
  • itemL : the list of key-item pairs which are supposed to be categorized with respect to key
Returns:
Html containing inner links between the categories

stringList2ItemList :: HTML a => [String] -> [(String,[a])]   

Convert a string list into an key-item list The strings are used as keys and for the simple text layout.