haddock-library-2.15.0: Library exposing some functionality of Haddock.

Copyright(c) Mateusz Kowalczyk 2013-2014, Simon Hengel 2013
LicenseBSD-like
Maintainerhaddock@projects.haskell.org
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Documentation.Haddock.Parser

Description

 

Synopsis

Documentation

parseString :: String -> DocH mod IString Source

Parse a text paragraph. Actually just a wrapper over parseStringBS which drops leading whitespace and encodes the string to UTF8 first.

parseParas Source

Arguments

:: String

String to parse

-> DocH mod IString 

Main entry point to the parser. Appends the newline character to the input string.

overIdentifier :: (String -> Maybe a) -> DocH mod IString -> DocH mod a Source

Maps over DocIdentifiers over String with potentially failing conversion using user-supplied function. If the conversion fails, the identifier is deemed to not be valid and is treated as a regular string.

toRegular :: DocH mod IString -> DocH mod String Source

Drops the quotes/backticks around all identifiers, as if they were valid but still Strings.

type IString = (Char, String, Char) Source

Identifier string surrounded with opening and closing quotes/backticks.