Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data DocNode a = DocTag String [(String, String)] [a]
- type Documentation = Free DocNode String
- class Documented t where
- docNodeAttrs :: Lens' (DocNode a) [(String, String)]
- docNodeSubs :: Lens [a] [b] (DocNode a) (DocNode b)
- docTag :: String -> [(String, String)] -> [Free DocNode a] -> Free DocNode a
- docTag' :: String -> [Free DocNode a] -> Free DocNode a
- nodoc :: String -> Documentation
- mkDoc :: String -> String -> Documentation
- showRawDoc :: Documentation -> String
- docAtom :: (ParseStream s, StreamChar s ~ Char, Monad m) => ParserT s m Documentation
- docLine :: (ParseStream s, StreamChar s ~ Char, Monad m) => String -> [(String, String)] -> ParserT s m Documentation
- docFormat :: (ParseStream s, StreamChar s ~ Char, Monad m) => String -> [Char] -> ParserT s m Documentation
- type DocParams = Forest (Map String) Documentation
- type DocPatterns = Map String ([String], Documentation)
- evalDoc :: DocParams -> Documentation -> Maybe Documentation
- evalDocWithPatterns :: DocPatterns -> DocParams -> Documentation -> Maybe Documentation
- data TagStyle = TagStyle {}
- data TermColor
- data TagDisplay
- type Style = Map String TagStyle
- defaultStyle :: Style
- tagColor :: Lens' TagStyle (Maybe TermColor, Maybe TermColor)
- tagDisplay :: Lens' TagStyle (Maybe TagDisplay)
- tagIsBold :: Lens' TagStyle (Maybe Bool)
- tagIsUnderlined :: Lens' TagStyle (Maybe Bool)
- tagIndent :: Lens' TagStyle (Maybe Int)
- tagPrefix :: Lens' TagStyle (Maybe String)
- tagIsItalic :: Lens' TagStyle (Maybe Bool)
- tagWordWrap :: Lens' TagStyle (Maybe Int)
- class Terminal trm where
- data DummyTerminal = DummyTerminal
- docString :: Terminal trm => trm -> Style -> Documentation -> String
- pretty :: Documented t => t -> String
- newtype Metadata = Metadata (Forest (Map String) String)
- i'Metadata :: Iso' (Forest (Map String) String) Metadata
- class Show a => FormatArg a where
- class FormatType a where
- format :: FormatType r => String -> r
The Documentation format
A documentation node (similar to a HTML node, but simpler)
Functor DocNode Source # | |
Foldable DocNode Source # | |
Traversable DocNode Source # | |
Serializable Bytes a => Serializable Bytes (DocNode a) Source # | |
Format Bytes a => Format Bytes (DocNode a) Source # | |
Serializable Bytes a => Serializable Bytes (Free DocNode a) Source # | |
Format Bytes a => Format Bytes (Free DocNode a) Source # | |
Eq a => Eq (DocNode a) Source # | |
Ord a => Ord (DocNode a) Source # | |
Show a => Show (DocNode a) Source # | |
Generic (DocNode a) Source # | |
Documented a => Documented (Free DocNode a) Source # | |
type Rep (DocNode a) Source # | |
class Documented t where Source #
document :: t -> Documentation Source #
Documented Int Source # | |
Documented String Source # | |
Documented Metadata Source # | |
Documented GlobalID Source # | |
Documented LibraryID Source # | |
Documented Builtin Source # | |
Documented CurlyParserException Source # | |
Identifier s => Documented (Type s) Source # | |
Identifier s => Documented (Strictness s) Source # | |
Documented (Symbol s) Source # | |
Documented a => Documented (Module a) Source # | |
Documented a => Documented (Free DocNode a) Source # | |
(Documented s, Documented a) => Documented (Expression s a) Source # | |
nodoc :: String -> Documentation Source #
showRawDoc :: Documentation -> String Source #
docAtom :: (ParseStream s, StreamChar s ~ Char, Monad m) => ParserT s m Documentation Source #
docLine :: (ParseStream s, StreamChar s ~ Char, Monad m) => String -> [(String, String)] -> ParserT s m Documentation Source #
docFormat :: (ParseStream s, StreamChar s ~ Char, Monad m) => String -> [Char] -> ParserT s m Documentation Source #
type DocPatterns = Map String ([String], Documentation) Source #
evalDoc :: DocParams -> Documentation -> Maybe Documentation Source #
Rendering documentation
Styles
TagStyle | |
|
defaultStyle :: Style Source #
Rendering
pretty :: Documented t => t -> String Source #
Metadata
Formatted Strings
class FormatType a where Source #
A base class for the format
function
FormatType String Source # | |
(FormatArg a, FormatType r) => FormatType (a -> r) Source # | |
format :: FormatType r => String -> r Source #
A function that mimics sprintf-style formatting for Haskell