Portability | portable |
---|---|
Stability | experimental |
Maintainer | rhymoid@gmail.com |
Safe Haskell | None |
- unlit :: Text -> ([UnlitError], Text)
- data UnlitError
- unlitLinesWith :: [Parser Text] -> [Text] -> ([UnlitError], [Text])
- ghcParsers :: [Parser Text]
- birdParser :: Parser Text
- latexParser :: Parser Text
- cppParser :: Parser Text
- pandocMarkdownParser :: (Text -> Active) -> Parser Text
- newtype Parser x = Parser (x -> [x] -> Maybe ([Classified x], Maybe [x]))
- data Classified x
- data Active
- lines :: Text -> [Text]
- unlines :: [Text] -> Text
unlit
unlit :: Text -> ([UnlitError], Text)Source
Runs unlitLinesWith
on a blob of text, using the default parsers of GHC.
unlitLinesWith :: [Parser Text] -> [Text] -> ([UnlitError], [Text])Source
Parsers
ghcParsers :: [Parser Text]Source
birdParser :: Parser TextSource
Parser for blocks of code prefixed by >
or <
.
latexParser :: Parser TextSource
Parser for blocks of code delimited by \begin{code}
and \end{code}
or \begin{pseudocode}
and \end{pseudocode}
.
pandocMarkdownParser :: (Text -> Active) -> Parser TextSource
Parser for lines fenced by backticks or tildes.
Defining custom parsers
data Classified x Source
Splitting and joining lines
Breaks a Text
up into a list of Text
s at newline sequences.
The resulting strings do not contain newline sequences.