Skip to content

composewell/markdown-doctest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Markdown doctest

Installation

$ cabal install markdown-doctest

Usage

$ ./markdown-doctest <filename.md>

Note: The ghc environment file should exist.

Syntax

3 type of codeblocks are parsed,

  • haskell: All haskell blocks are tangled into a common file and checked.
  • haskell unshared: These blocks are loaded independently and dont share anything.
  • haskell docspec: These blocks share the syntax of docspec and share the env.

Example

markdown-doctest will successfully validate this file.

import qualified Prelude as P
import qualified Prelude as P

main =
    P.print "Hello, World!"
>>> import qualified Prelude as P
main =
    P.print "Hello, World!"
>>> P.filter P.odd [1..10]
[1,3,5,7,9]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •