"Fossies" - the Fresh Open Source Software Archive

Member "pandoc-2.7.3/test/haddock-reader.haddock" (12 Jun 2019, 1344 Bytes) of package /linux/www/pandoc-2.7.3.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

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