-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | The Simple Nice-Looking Manual Generator.
--
-- snm allows you to write clean, web-friendly reports, user guides and
-- manuals without having to edit fickle html.
--
-- snm allows you to structure your document in a modular fashion.
--
-- snm document sections are written in yaml and are easy to write and
-- understand.
--
-- snm is a generator of small, valid xhtml files.
--
-- Read the snm manual online:
-- http:www.killersmurf.comstaticsnm_help.html
@package snm
@version 0.0.2
-- | The structure of a manual
module Manual.Structure
-- | We just see a CSS file as a string
type CSS = String
-- | A banner for the top of the document
data Banner
Banner :: ![Inline] -> !String -> Banner
btext :: Banner -> ![Inline]
bclass :: Banner -> !String
-- | A manual's header file
data Header
Header :: !Banner -> ![Banner] -> ![Paragraph] -> Header
-- | The name of the manual
mtitle :: Header -> !Banner
-- | Banners
banners :: Header -> ![Banner]
-- | Preamble, not linked in the manual's contents.
preamble :: Header -> ![Paragraph]
-- | Inline document elements may be...
data Inline
-- | A text string
IText :: String -> Inline
-- | A link to another section
ISectionLink :: String -> String -> Inline
-- | The link text.
ltext :: Inline -> String
-- | The section number
ldest :: Inline -> String
-- | An external link.
IExternLink :: String -> String -> Inline
-- | The link text.
ltext :: Inline -> String
-- | The section number
ldest :: Inline -> String
-- | Literal text
ILiteral :: String -> Inline
-- | A text paragraph
data Paragraph
Paragraph :: ![Inline] -> String -> Bool -> Paragraph
-- | The paragraph text
ptext :: Paragraph -> ![Inline]
-- | The paragraph's class
pclass :: Paragraph -> String
-- | Wrap the text
wrap :: Paragraph -> Bool
-- | A manual
data Manual
Manual :: Header -> CSS -> Contents -> ![Section] -> Manual
-- | The manual's header file.
header :: Manual -> Header
-- | The style used in the manual.
style :: Manual -> CSS
-- | The manual's contents.
mcontents :: Manual -> Contents
-- | The sections of a manual.
sections :: Manual -> ![Section]
-- | Sections, subsections
data Section
Section :: [Int] -> Banner -> String -> ![Paragraph] -> ![Section] -> Section
-- | The section's number.
number :: Section -> [Int]
-- | The title of the section
title :: Section -> Banner
-- | Unique name for this section
unique :: Section -> String
-- | The section text
stext :: Section -> ![Paragraph]
-- | Subsections
subsections :: Section -> ![Section]
-- | Contents listing
data Contents
Contents :: [Contents] -> Contents
Entry :: [Int] -> String -> String -> Contents
instance Show Contents
instance Show Section
instance Show Manual
instance Show Paragraph
instance Show Inline
instance Show Header
instance Show Banner
-- | Pretty print manuals as text
module Manual.Emit.Text
contents :: [Section] -> Contents
gather_sections :: [Section] -> [Contents]
subsection_contents :: Section -> [Contents]
mock_shows :: String -> ShowS
pretty_nums :: [Int] -> ShowS
-- | Copyright notice
copy_notice :: String -> String
-- | License notice
license_notice :: String -> String
-- | License file notice
license_file_notice :: String -> String
instance Pretty Inline
instance Pretty Banner
instance Pretty Header
instance Pretty Paragraph
instance Pretty Section
instance Pretty Manual
instance Pretty Contents
module Manual.Emit.XHTML
-- | Render the manual as XHTML and show as a string
render_manual_xhtml :: Manual -> String
-- | Get the banner class for banners in the introduction
intro_ban_class :: Banner -> [HtmlAttr]
nbsp :: Html
hcontents :: Int -> Contents -> Html
section_title :: [Int] -> Banner -> String -> Html
section_name :: [Int] -> String -> String
-- | Banners for the sections
section_ban_class :: Banner -> [HtmlAttr]
-- | The banner's class
ban_class :: String -> Banner -> [HtmlAttr]
-- | Make an inline element into html
html_inline :: Bool -> Inline -> Html
-- | Convert all spaces and newlines into literal html spaces and newlines.
literal_spaces :: String -> Html
-- | Internal link to elsewhere in the document
section_link :: String -> URL -> Html
-- | External link to something else
extern_link :: String -> URL -> Html
instance HTML Banner
instance HTML Paragraph
instance HTML Section
instance HTML Contents
instance HTML Header
instance HTML Manual
-- | Emit manuals
module Manual.Emit
-- | Emit a manual as text
emit_text :: Manual -> String
-- | Emit a manual as rendered xhtml
emit_xhtml :: Manual -> String
-- | Simpler yaml interface
module Data.Yaml.Simple
-- | Things that can be encoded as YAML
class Yamlable y
from_yaml :: (Yamlable y) => Yaml -> IO y
-- | Yaml
data Yaml
YMap :: (Map Yaml Yaml) -> Yaml
YSeq :: [Yaml] -> Yaml
YStr :: String -> Yaml
YNil :: Yaml
-- | Simplify Syck's yaml type
simplify :: YamlNode -> Yaml
-- | Parse yaml
parse_yaml :: String -> IO Yaml
-- | Parse yaml file
parse_yaml_file :: FilePath -> IO Yaml
-- | Look up a yaml element referenced by a string in a yaml map
yookup :: String -> Yaml -> Maybe Yaml
instance Show Yaml
instance Eq Yaml
instance Ord Yaml
-- | Read a manual from its source files
module Manual.Reader
-- | Parse an inline element
inline :: Parser Inline
-- | Parse inline elements
eparse_inline :: String -> Either ParseError [Inline]
-- | Parse inline elements
parse_inline :: String -> IO [Inline]
-- | Read a string from maybe a yaml
yext :: Maybe Yaml -> String -> String
ystr :: Yaml -> Maybe String
ymap :: (Yaml -> a) -> Yaml -> Maybe [a]
-- | Read a banner from what might be some yaml
read_mbanner :: Banner -> Maybe Yaml -> IO Banner
read_key :: String -> Maybe Yaml -> String
not_empty :: String -> String -> String
-- | Load a section and all associated subsections.
load_section :: FilePath -> IO Section
-- | Catch errors while reading files
catch_read_errs :: String -> IO a -> IO a
-- | Load a section and all associated subsections.
load_section_nums :: FilePath -> [Int] -> IO Section
sort_sections :: [Section] -> [Section]
paras :: Maybe Yaml -> IO (Maybe [Paragraph])
-- | Get the qualified names of files in a directory
getDirectoryFiles :: FilePath -> IO [FilePath]
-- | Load a manual from a directory
load_manual :: FilePath -> IO Manual
instance Yamlable Header
instance Yamlable Section
instance Yamlable Paragraph
instance Yamlable Banner
-- | Read and output manuals
module Manual
-- | The output types
data OutputType
XHtml :: OutputType
Text :: OutputType
-- | Load a manual from a directory
load_manual :: FilePath -> IO Manual
-- | Write out a manual
write_manual :: (Manual -> String) -> String -> Manual -> FilePath -> IO ()
-- | Write in a number of formats
formats :: Map OutputType (Manual -> String, String)
text_format :: (Manual -> String, String)
xhtml_format :: (Manual -> String, String)
instance Eq OutputType
instance Ord OutputType