cryptol-3.5.0: Cryptol: The Language of Cryptography
Copyright(c) 2013-2025 Galois Inc.
LicenseBSD3
Maintainercryptol@galois.com
Stabilityprovisional
Portabilityportable
Safe HaskellSafe
LanguageHaskell2010

Cryptol.TypeCheck.Docstrings

Description

 
Synopsis

Documentation

data DocItem Source #

Constructors

DocItem 

Fields

data DocFor Source #

Instances

Instances details
PP DocFor Source # 
Instance details

Defined in Cryptol.TypeCheck.Docstrings

Methods

ppPrec :: Int -> DocFor -> Doc Source #

ppPrecWithAnnot :: [([Int], PPAnnot)] -> Int -> DocFor -> Doc Source #

extractCodeBlocks :: Text -> [[Text]] Source #

Extract the code blocks from the body of a docstring.

A single code block starts with at least 3 backticks followed by an optional language specifier of "cryptol". This allows other kinds of code blocks to be included (and ignored) in docstrings. Longer backtick sequences can be used when a code block needs to be able to contain backtick sequences.

/**
 * A docstring example
 *
 * ```cryptol
 * :check example
 * ```
 */