-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Haskell Static Web Page Generator -- -- A library for generating static HTML pages from XML templates and a -- file-based value dictionary. @package halipeto @version 2.2 module Halipeto.Utilities slash :: String -> String -> String toSlash :: [String] -> FilePath fromSlash :: FilePath -> [String] toSep :: Char -> [String] -> String fromSep :: Char -> String -> [String] dropSpace :: String -> String mapT2 :: (a -> b) -> (a, a) -> (b, b) mapT3 :: (a -> b) -> (a, a, a) -> (b, b, b) thenMaybe :: (a -> Maybe b) -> (b -> Maybe c) -> (a -> Maybe c) module Halipeto.Dictionary class Dictionary d a add :: (Dictionary d a) => d a -> ([String], a) -> d a add' :: (Dictionary d a) => d a -> (String, a) -> d a addAll :: (Dictionary d a) => d a -> [([String], a)] -> d a addAll' :: (Dictionary d a) => d a -> [(String, a)] -> d a search :: (Dictionary d a) => d a -> [String] -> Maybe a search' :: (Dictionary d a) => d a -> String -> Maybe a keys :: (Dictionary d a) => d a -> [[String]] keys' :: (Dictionary d a) => d a -> [String] contents :: (Dictionary d a) => d a -> [([String], a)] contents' :: (Dictionary d a) => d a -> [(String, a)] values :: (Dictionary d a) => d a -> [a] children :: (Dictionary d a) => d a -> [String] -> [d a] children' :: (Dictionary d a) => d a -> String -> [d a] adopt :: (Dictionary d a) => d a -> ([String], d a) -> d a adopt' :: (Dictionary d a) => d a -> (String, d a) -> d a merge :: (Dictionary d a) => d a -> d a -> d a null :: Char empty :: (Dictionary DictCase a) => DictCase a emptyNC :: (Dictionary DictNoCase a) => DictNoCase a toDot :: [String] -> String fromDot :: String -> [String] class (OrdDictionary d String) => SubDictionary d substitute :: (SubDictionary d) => d String -> String -> String subAll :: (SubDictionary d) => d String -> [String] -> [String] search'' :: (SubDictionary d) => d String -> [String] -> Maybe String class (Ord a, Dictionary d a) => OrdDictionary d a diff :: (OrdDictionary d a) => d a -> d a -> ([([String], a)], [([String], a)], [([String], a)]) diff' :: (OrdDictionary d a) => d a -> d a -> ([(String, a)], [(String, a)], [(String, a)]) instance (Show a) => Show (Dict a) instance Eq (SU a) instance Ord (SU a) instance SubDictionary DictNoCase instance SubDictionary DictCase instance (Ord a) => OrdDictionary DictNoCase a instance (Ord a) => OrdDictionary DictCase a instance Dictionary DictNoCase a instance (Show a) => Show (DictNoCase a) instance Dictionary DictCase a instance (Show a) => Show (DictCase a) module Halipeto.Template type CustomFn s f = Context s f -> Arg -> IO (Context s f, Result s f) data Result s f -- | Add an attribute Attr :: Name -> String -> Result s f -- | Add text Text :: Position -> String -> Result s f -- | Add XML Xml :: Position -> [Element] -> Result s f -- | Recurse on function Repeat :: (CustomFn s f) -> Result s f -- | Process next attribute Continue :: Result s f -- | Delete contents Skip :: Result s f data Position -- | Insert data before current contents Before :: Position -- | Insert data after current contents After :: Position -- | Replace current contents Replace :: Position hal :: String type UpdateDict s = s String -> [String] -> s String data Page s Page :: [String] -> String -> UpdateDict s -> Page s -- | Path to page path :: Page s -> [String] -- | Page template template :: Page s -> String -- | State for page dictionary :: Page s -> UpdateDict s data TreeSite s TreeSite :: Maybe (Page s) -> [TreeSite s] -> TreeSite s data Context s f Ctx :: s String -> f (CustomFn s f) -> TreeSite s -> Context s f -- | State dictionary state :: Context s f -> s String -- | Functions dictionary funcs :: Context s f -> f (CustomFn s f) -- | Site structure site :: Context s f -> TreeSite s readTemplate :: String -> IO Template evalElement :: (SubDictionary s, Dictionary f (CustomFn s f)) => Context s f -> Element -> IO Element evalDocument :: (SubDictionary s, Dictionary f (CustomFn s f)) => Context s f -> Document -> IO Document module Halipeto.Functions split :: Int -> String -> [String] parse :: (SubDictionary d) => d String -> Int -> String -> [String] eval :: (SubDictionary s, Dictionary f (CustomFn s f)) => CustomFn s f attribute :: (SubDictionary s, Dictionary f (CustomFn s f)) => CustomFn s f text :: (SubDictionary s, Dictionary f (CustomFn s f)) => CustomFn s f textReplace :: (SubDictionary s, Dictionary f (CustomFn s f)) => CustomFn s f textAfter :: (SubDictionary s, Dictionary f (CustomFn s f)) => CustomFn s f repeat :: (SubDictionary s, Dictionary f (CustomFn s f)) => CustomFn s f addDefaultsFn :: (SubDictionary s, Dictionary f (CustomFn s f)) => f (CustomFn s f) -> f (CustomFn s f) parseElements :: String -> [Element] parseElement :: String -> String -> Element mkElements :: Position -> String -> CustomFn s f mkElement :: Position -> String -> String -> CustomFn s f xhtml :: (SubDictionary s, Dictionary f (CustomFn s f)) => Position -> CustomFn s f element :: (SubDictionary s, Dictionary f (CustomFn s f)) => Position -> CustomFn s f module Halipeto.Pages type PageGen s = s String -> s String -> TreeSite s type PageGenS s = s String -> s String -> [TreeSite s] idD :: UpdateDict s page :: (SubDictionary s) => [String] -> String -> UpdateDict s -> PageGenS s -> PageGen s noPage :: (SubDictionary s) => PageGenS s -> PageGen s append :: PageGenS s -> PageGen s -> PageGenS s repeat :: (SubDictionary s) => String -> String -> PageGen s -> PageGenS s leafP :: PageGenS s foldT :: (Maybe (Page s) -> a -> a) -> a -> TreeSite s -> a setSiteDetails :: (SubDictionary s) => s String -> String -> String -> s String generate :: (SubDictionary s, Dictionary f (CustomFn s f)) => Context s f -> IO () menuClass :: [([Char], AttValue)] menuClass' :: ([Char], AttValue) type Label s = s String -> Page s -> Maybe [Element] type Collect = [Element] -> [Element] -> [Element] baseMenu :: Collect -> TreeSite s -> s String -> Label s -> [Element] listMenu :: TreeSite s -> s String -> Label s -> Element instance Show (TreeSite s) instance Eq (Page s) instance Show (Page s) module Halipeto.SimpleDB type Translate = [String] -> Maybe [String] noCVS :: Translate allFiles :: Translate type ReadDB d = Translate -> d String -> FilePath -> [String] -> IO (d String) addDefaultsDB :: (Dictionary d String, Dictionary r (ReadDB d)) => r (ReadDB d) -> r (ReadDB d) readDB :: (Dictionary d String, Dictionary r (ReadDB d)) => r (ReadDB d) -> Translate -> d String -> FilePath -> IO (d String) readDB' :: (Dictionary d String) => Translate -> d String -> FilePath -> IO (d String)