module Web.Page(Templates(..), defaultTemplates, loadTemplates) where import Web.Template data Templates = Templates {header :: String -> String -> String -> String -> String ,footer :: String -> String ,welcome :: String ,parseError :: String -> String -> String } defaultTemplates :: Templates defaultTemplates = Templates _header _footer _welcome _parseError loadTemplates :: String -> Templates loadTemplates x = Templates _header _footer _welcome _parseError where [__header,__footer,__welcome,__parseError] = reload x $ ("header",["css","js","query","queryHyphen"]) : ("footer",["version"]) : ("welcome",[]) : ("parseError",["errFormat","errMessage"]) : [] _header css js query queryHyphen = __header [css,js,query,queryHyphen] _footer version = __footer [version] _welcome = __welcome [] _parseError errFormat errMessage = __parseError [errFormat,errMessage] _header css js query queryHyphen = "" ++ "\n\n \n \n " ++ escapeHTML query ++ " " ++ escapeHTML queryHyphen ++ " Hoogle\n \n \n \n \n \n\t\t\n \n \n \n \n \n \n
\n \n Instant is off |\n Search plugin |\n Manual |\n haskell.org\n\n
\n
\n \n \"Hoogle\"\n\n \n \n
\n
\n" _footer version = "" ++ "
\n

© Neil Mitchell 2004-2012, version " ++ escapeHTML version ++ "

\n \n\n" _welcome = "" ++ "

Welcome to Hoogle

\n\n

\n Hoogle is a Haskell API search engine, which allows you to search many standard Haskell libraries\n by either function name, or by approximate type signature.\n

\n

\n Example searches:
\n map\n
\n (a -> b) -> [a] -> [b]\n
\n Ord a => [a] -> [a]\n
\n Data.Map.insert\n
\n\t
Enter your own search at the top of the page.\n

\n

\n The Hoogle manual contains more details,\n including further details on search queries, how to install Hoogle as a command line application\n and how to integrate Hoogle with Firefox/Emacs/Vim etc.\n

\n

\n I am very interested in any feedback you may have. Please\n email me, or add an entry to my\n bug tracker.\n

\n" _parseError errFormat errMessage = "" ++ "

" ++ errFormat ++ "

\n

\n\tParse error: " ++ escapeHTML errMessage ++ "\n

\n\tFor information on what queries should look like, see the\n\tuser manual.\n

\n"