Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- generateDocs :: Path Abs Dir -> Path Abs Dir -> Maybe Text -> Text -> CharacterSet -> IO ()
- generateDocsPure :: Maybe Text -> Text -> CharacterSet -> [(Path Rel File, ByteString)] -> GeneratedDocs [(Path Rel File, Text)]
- data GeneratedDocs a = GeneratedDocs [DocsGenWarning] a
- parseComments :: String -> Text -> [DhallComment 'RawComment]
- data CommentParseError
- data DhallDocsText
- parseSingleDhallDocsComment :: String -> Text -> Maybe (Either [CommentParseError] DhallDocsText)
- unDhallDocsText :: DhallDocsText -> Text
Core functionality
:: Path Abs Dir | Input directory |
-> Path Abs Dir | Link to be created to the generated documentation |
-> Maybe Text | Base import URL |
-> Text | Package name, used in some HTML titles |
-> CharacterSet | Output encoding |
-> IO () |
Generate all of the docs for a package. This function does all the `IO ()`
related tasks to call generateDocsPure
:: Maybe Text | Base import URL |
-> Text | Package name |
-> CharacterSet | Output encoding |
-> [(Path Rel File, ByteString)] | (Input file, contents) |
-> GeneratedDocs [(Path Rel File, Text)] |
Generates all the documentation of dhall package in a pure way i.e.
without an IO
context. This let you generate documentation from a list of
dhall-files without saving them to the filesystem.
If you want the IO
version of this function, check generateDocs
data GeneratedDocs a Source #
The result of the doc-generator pure component
GeneratedDocs [DocsGenWarning] a |
Instances
Applicative GeneratedDocs Source # | |
Defined in Dhall.Docs.Core pure :: a -> GeneratedDocs a # (<*>) :: GeneratedDocs (a -> b) -> GeneratedDocs a -> GeneratedDocs b # liftA2 :: (a -> b -> c) -> GeneratedDocs a -> GeneratedDocs b -> GeneratedDocs c # (*>) :: GeneratedDocs a -> GeneratedDocs b -> GeneratedDocs b # (<*) :: GeneratedDocs a -> GeneratedDocs b -> GeneratedDocs a # | |
Functor GeneratedDocs Source # | |
Defined in Dhall.Docs.Core fmap :: (a -> b) -> GeneratedDocs a -> GeneratedDocs b # (<$) :: a -> GeneratedDocs b -> GeneratedDocs a # | |
Monad GeneratedDocs Source # | |
Defined in Dhall.Docs.Core (>>=) :: GeneratedDocs a -> (a -> GeneratedDocs b) -> GeneratedDocs b # (>>) :: GeneratedDocs a -> GeneratedDocs b -> GeneratedDocs b # return :: a -> GeneratedDocs a # | |
Show a => Show (GeneratedDocs a) Source # | |
Defined in Dhall.Docs.Core showsPrec :: Int -> GeneratedDocs a -> ShowS # show :: GeneratedDocs a -> String # showList :: [GeneratedDocs a] -> ShowS # |
Comment parsing
parseComments :: String -> Text -> [DhallComment 'RawComment] Source #
Parse all comments in a text fragment
data CommentParseError Source #
MissingNewlineOnBlockComment | |
BadSingleLineCommentsAlignment | |
BadPrefixesOnSingleLineComments | |
SeveralSubseqDhallDocsComments |
Instances
Show CommentParseError Source # | |
Defined in Dhall.Docs.Comment showsPrec :: Int -> CommentParseError -> ShowS # show :: CommentParseError -> String # showList :: [CommentParseError] -> ShowS # |
data DhallDocsText Source #
Extracted text from a valid dhall-docs
comment
Instances
Show DhallDocsText Source # | |
Defined in Dhall.Docs.Comment showsPrec :: Int -> DhallDocsText -> ShowS # show :: DhallDocsText -> String # showList :: [DhallDocsText] -> ShowS # |
parseSingleDhallDocsComment :: String -> Text -> Maybe (Either [CommentParseError] DhallDocsText) Source #
Returns Nothing
when DhallDocsComment
was parsed or no error was detected
unDhallDocsText :: DhallDocsText -> Text Source #