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.


Exported Functions: categorizeByItemKey, list2CategorizedHtml, stringList2ItemList


Exported Functions


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

General categorization of a list of entries.

The item will occur in every category for which the boolean function categoryFun yields True. categorized with respect to key sorted in categories to distribute the items among the categories.

:: (HTML b, Show c)
=> [(a, [h])]  the list of key-item pairs which are supposed to be
-> [(b, String)]  list of key-category pairs to which the items can be
-> a -> b -> Bool  uses the keys of the items and the keys of the
-> [h]  Html containing inner links between the categories

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

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. categorized with respect to key

:: HTML a
=> [(String, [h])]  the list of key-item pairs which are supposed to be
-> [h]  Html containing inner links between the categories

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

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