rzk-0.5.4: An experimental proof assistant for synthetic ∞-categories
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.Rzk.Syntax

Synopsis

Documentation

printTree :: Print a => a -> String Source #

The top-level printing method.

extractMarkdownCodeBlocks :: String -> String -> String Source #

Extract code for a given alias (e.g. "rzk" or "haskell") from a Markdown file by replacing any lines that do not belong to the code in that language with blank lines. This way the line numbers are preserved correctly from the original file.

All of the following notations are supported to start a code block:

  • ```rzk
  • ```{.rzk title="Example"}
  • ``` { .rzk title="Example" }
>>> example = "Example:\n```rzk\n#lang rzk-1\n```\nasd asd\n```rzk\n#def x : U\n  := U\n``` \nasda"
>>> putStrLn example
Example:
```rzk
#lang rzk-1
```
asd asd
```rzk
#def x : U
  := U
```
asda
>>> putStrLn $ extractMarkdownCodeBlocks "rzk" example


#lang rzk-1



#def x : U
  := U