Agda-2.5.2: A dependently typed functional programming language and proof assistant

Safe HaskellNone
LanguageHaskell2010

Agda.Syntax.Parser.Literate

Description

Preprocessors for literate code formats

Synopsis

Documentation

literateProcessors :: [(String, Processor)] Source #

List of valid extensions for literate Agda files, and their corresponding preprocessors.

If you add new extensions, remember to update test/Utils.hs so that test cases ending in the new extensions are found.

literateExts :: [String] Source #

Possible extensions for a literate Agda file

literateExtsShortList :: [String] Source #

Short list of extensions for literate Agda files For display purposes.

literateTeX :: Position -> String -> [Layer] Source #

Preprocessor for literate TeX

literateRsT :: Position -> String -> [Layer] Source #

Preprocessor for reStructuredText

illiterate :: [Layer] -> String Source #

Blanks the non-code parts of a given file, preserving positions of characters corresponding to code. This way, there is a direct correspondence between source positions and positions in the processed result.

isCode :: Layer -> Bool Source #

Checks if a layer corresponds to Agda code

type Processor = Position -> String -> [Layer] Source #

Type of a literate preprocessor: Invariants:

f : Processor
f pos s /= []
f pos s >>= layerContent == s