git.iko.soy/typeable/pandoc
on source_date_epoch help sign in
typeable/pandoc/test/haddock-reader.haddock
65 lines 1.3 kB history raw
1This file tests the Pandoc reader for Haddock.
2We've borrowed examples from Haddock's documentation: <http://www.haskell.org/haddock/doc/html/ch03s08.html>.
4The following characters have special meanings in Haddock, \/, \', \`, \", \@, \<, so they must be escaped.
6\* This is a paragraph, not a list item.
7\> This sentence is not code.
8\>\>\> This is not an example.
10The references &#x3BB;, &#x3bb; and &#955; all represent the lower-case letter lambda.
12This is a code block:
14> map :: (a -> b) -> [a] -> [b]
15> map _ [] = []
16> map f (x:xs) = f x : map f xs
18This is another code block:
21f x = x + x.
22The \@...\@ code block /interprets markup normally/.
23"Module.Foo"
24\"Hello World\"
27Haddock supports REPL examples:
29>>> fib 10
3055
31>>> putStrLn "foo\nbar"
32foo
33bar
35That was /really cool/!
36I had no idea @fib 10 = 55@.
38This module defines the type 'T'.
39The identifier 'M.T' is not in scope
40I don't have to escape my apostrophes; great, isn't it?
41This is a reference to the "Foo" module.
43This is a bulleted list:
45 * first item
47 * second item
49This is an enumerated list:
51 (1) first item
53 2. second item
55This is a definition list:
57 [@foo@] The description of @foo@.
59 [@bar@] The description of @bar@.
61Here is a link: <http://haskell.org>
63<http://haskell.org Haskell> is a fun language!
65<http://example.com Click Here!>