|
|
|
|
| Synopsis |
|
|
|
| Documentation |
|
| class TemplateOne a where |
| Single item to render in template.
| | | Methods | | showO :: a -> String | | Show
| | | intField :: Int -> a -> Int | | Get n'th integer field
| | | stringField :: Int -> a -> String | | Get n'th string field
| | | boolField :: Int -> a -> Bool | | Get n'th boolean field
| | | getRelated :: a -> [(String, [a])] | | Get assoc.list of related models
| | | getPerPage :: a -> Int | | Get number of items to put on one page
|
| | Instances | |
|
|
| class TemplateOne a => TemplateItem a where |
| Multiple-valued item to render in template.
| | | Methods | | showT :: a -> String | | Show
| | | intFields :: Int -> a -> [Int] | | Get list of n'th integer fields in all items
| | | stringFields :: Int -> a -> [String] | | Get list of n'th string fields in all items
| | | boolFields :: Int -> a -> [Bool] | | Get list of n'th boolean fields in all items
| | | mkList :: a -> [TContainer] | | Convert to a list
| | | isTrue :: a -> Bool | | Check whether this item equivalent to True
|
| | Instances | |
|
|
| showC :: TContainer -> String |
| Show TContainer
|
|
| data TContainer |
| Container type for any renderable value
| | Constructors | | Instances | |
|
|
| type Context = [(String, TContainer)] |
|
| class Applicable f a b where |
| Claims a fact that values of type f can be applied to value of type
a, resulting value of type b
| | | Methods | | app :: Int -> f -> a -> b |
| | Instances | |
|
|
| apply :: Applicable f a b => f -> a -> b |
| Same as `app 1'
|
|
| class FieldType a where |
| TContainer can have fields of such types
| | | Methods | | | Instances | |
|
|
| idString :: String -> String |
|
| idInt :: Int -> Int |
|
| idBool :: Bool -> Bool |
|
| field |
| :: FieldType a | | | => Int | Number of the field
| | -> Maybe TContainer | | | -> a | Type of field determined by return type
| | Get a field from TContainer
|
|
|
| Produced by Haddock version 2.4.2 |