gjurgensen / coqToMd

A parser from an annotated Coq file to a Jekyll markdown file

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

coqToMd

Parses an annotated Coq file, and generates a corresponding markdown file.

Build

This project requires Haskell Stack. Build the project with stack build.

Use

Use coqToMd by piping in the Coq file, and piping the output to a new markdown file. E.g.

stack exec coqToMd < myCoqFile.v > myMdFile.md

Translation Rules

Coq comments with an additional asterisk at the beginning are interpreted as text/markdown. coqToMd will pull the content out of the comments, and insert them directly into the markdown. E.g. (** foo *) is translated to foo.

If the comment has further asterisks, these are interpreted as headers. E.g. (** ** foo *) is translated as ## foo.

Everything else is interpreted as Coq code, and enclosed by the Jeykll {% highlight Coq %} and {% endhighlight %} directives.

About

A parser from an annotated Coq file to a Jekyll markdown file

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Haskell 100.0%