From 2448bd71609688be7b8bfe362a8534959531cd79 Mon Sep 17 00:00:00 2001 From: Simon Hengel Date: Sun, 8 Sep 2013 10:33:38 +0200 Subject: Fix totality, unicode, examples, paragraph parsing Also simplify specs and parsers while we're at it. Some parsers were made more generic. This commit is a part of GHC pre-merge squash, email fuuzetsu@fuuzetsu.co.uk if you need the full commit history. --- html-test/ref/A.html | 12 +- html-test/ref/B.html | 12 +- html-test/ref/Bug1.html | 3 +- html-test/ref/Bug3.html | 3 +- html-test/ref/Bug4.html | 3 +- html-test/ref/Bug6.html | 18 +- html-test/ref/Bug7.html | 15 +- html-test/ref/BugDeprecated.html | 9 +- html-test/ref/DeprecatedClass.html | 6 +- html-test/ref/DeprecatedData.html | 9 +- html-test/ref/DeprecatedFunction.html | 6 +- html-test/ref/DeprecatedModule.html | 3 +- html-test/ref/DeprecatedNewtype.html | 6 +- html-test/ref/DeprecatedReExport.html | 11 +- html-test/ref/DeprecatedRecord.html | 9 +- html-test/ref/DeprecatedTypeFamily.html | 3 +- html-test/ref/DeprecatedTypeSynonym.html | 3 +- html-test/ref/Examples.html | 15 +- html-test/ref/FunArgs.html | 27 +-- html-test/ref/GADTRecords.html | 9 +- html-test/ref/Hash.html | 21 +- html-test/ref/HiddenInstances.html | 18 +- html-test/ref/HiddenInstancesB.html | 12 +- html-test/ref/Hyperlinks.html | 6 +- html-test/ref/IgnoreExports.html | 6 +- html-test/ref/ModuleWithWarning.html | 3 +- html-test/ref/NamedDoc.html | 3 +- html-test/ref/NoLayout.html | 3 +- html-test/ref/NonGreedy.html | 3 +- html-test/ref/Properties.html | 3 +- html-test/ref/PruneWithWarning.html | 5 +- html-test/ref/SpuriousSuperclassConstraints.html | 21 +- html-test/ref/Test.html | 264 ++++++++--------------- html-test/ref/Ticket112.html | 3 +- html-test/ref/Ticket253_1.html | 6 +- html-test/ref/Ticket253_2.html | 3 +- html-test/ref/Ticket61.html | 3 +- html-test/ref/Ticket75.html | 3 +- html-test/ref/TitledPicture.html | 6 +- html-test/ref/TypeFamilies.html | 15 +- html-test/ref/Unicode.html | 3 +- html-test/ref/mini_Test.html | 2 +- 42 files changed, 201 insertions(+), 393 deletions(-) (limited to 'html-test') diff --git a/html-test/ref/A.html b/html-test/ref/A.html index 4d55ba16..0346574f 100644 --- a/html-test/ref/A.html +++ b/html-test/ref/A.html @@ -123,8 +123,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_A.html");}; >

Doc for test2 -

Doc for test2

Should show up on the page for both modules A and B -

Should show up on the page for both modules A and B

Doc for consructor -

Doc for consructor

Should show up on the page for both modules A and B -

Should show up on the page for both modules A and B

. Module link: Prelude. -

.

Should show up on the page for both modules A and B -

Should show up on the page for both modules A and B

Should show up on the page for both modules A and B -

Should show up on the page for both modules A and B

Doc for consructor -

Doc for consructor

T. -

.

/multi-line - emphasis/ -

don't use apostrophe's in the wrong place's -

don't use apostrophe's in the wrong place's

Description

Exporting records. -

Exporting records.

This record is exported without its field -

This record is exported without its field

.. with its field, but the field is named separately in the export list - (the field isn't documented separately since it is already documented here) -

.. with fields names as subordinate names in the export -

.. with fields names as subordinate names in the export

.. with only some of the fields exported (we can't handle this one - - how do we render the declaration?) -

a newtype with a field -

a newtype with a field

This module caused a duplicate instance in the documentation for the Foo - type. -

The Foo datatype -

The Foo datatype

Just one instance -

Just one instance

x y

The Bar class -

The Bar class

Just one instance -

Just one instance

Deprecated: for one

some documentation for one, two and three -

some documentation for one, two and three

Deprecated: for three

some documentation for one, two and three -

some documentation for one, two and three

Deprecated: for two

some documentation for one, two and three -

some documentation for one, two and three

Deprecated: SomeClass

some class -

some class

Deprecated: foo

documentation for foo -

documentation for foo

Deprecated: Foo

type Foo -

type Foo

Deprecated: Foo

constructor Foo -

constructor Foo

Deprecated: Bar

constructor Bar -

constructor Bar

instead

some documentation for foo -

some documentation for foo

some documentation for bar -

some documentation for bar

Documentation for DeprecatedModule. -

.

Deprecated: SomeNewType

some documentation -

some documentation

Deprecated: SomeNewTypeConst

constructor docu -

constructor docu

Description

What is tested here: -

What is tested here:

instead

some documentation for foo -

some documentation for foo

Not yet working, see http://trac.haskell.org/haddock/ticket/223 - , isEmptyChan -

type Foo -

type Foo

some name -

some name

Deprecated: do not use this

some value -

some value

Deprecated: SomeTypeFamily

some documentation -

some documentation

Deprecated: TypeSyn

some documentation -

some documentation

Integer. -

.

Examples: -

Examples:

>>> 55
 

One more Example: -

One more Example:

>>> 5
 

One more Example: -

One more Example:

>>> 5
 

Example with an import: -

Example with an import:

>>> 

First argument -

First argument

-> a

Second argument -

Second argument

Third argument -

Third argument

-> (a -> a)

Fourth argument -

Fourth argument

-> ()

Result -

Result

:: a

First argument -

First argument

-> b

Second argument -

Second argument

-> c

Third argument -

Third argument

-> d

Result -

Result

h1 -

h1

hello docs -

hello docs

:: a

hello2 docs -

hello2 docs

Implementation of fixed-size hash tables, with a type - class for constructing hash values for structured types. -

Eq. -

.

key val)

Builds a new hash table with a given size -

Builds a new hash table with a given size

()

Inserts a new element into the hash table -

Inserts a new element into the hash table

Nothing otherwise. -

otherwise.

A class of types which can be hashed. -

A class of types which can be hashed.

Int -

a

Should be visible -

Should be visible

Should be visible -

Should be visible

Should be visible -

Should be visible

Should be visible -

Should be visible

Should be visible -

Should be visible

Should be visible -

Should be visible

a

Should be visible -

Should be visible

Should be visible -

Should be visible

Should be visible -

Should be visible

Should be visible -

Should be visible

A plain URL: http://example.com/ -

A URL with a label: some link -

documentation for foo -

documentation for foo

documentation for bar -

documentation for bar

Documentation for ModuleWithWarning. -

.

Documentation

bar -

bar

g -

url1 url2 -

Integer. -

.

fib n <= fib (n + 1)
Description

What is tested here: -

What is tested here:

visible. -

.

This comment applies to the following declaration - and it continues until the next non-comment line -

A constructor -

constructor

B constructor -

constructor

a b

An abstract data declaration -

An abstract data declaration

a b

A data declaration with no documentation annotations on the constructors -

A data declaration with no documentation annotations on the constructors

A3 -

B3 -

Testing alternative comment styles -

Testing alternative comment styles

A4 -

B4 -

C4 -

a

A newtype -

A newtype

a b

A newtype with a fieldname -

A newtype with a fieldname

a b

A newtype with a fieldname, documentation on the field -

A newtype with a fieldname, documentation on the field

n3 field -

field

An abstract newtype - we show this one as data rather than newtype because - the difference isn't visible to the programmer for an abstract type. -

:: a b

no docs on the datatype or the constructor -

no docs on the datatype or the constructor

docs on the constructor only -

docs on the constructor only

a b

docs on the newtype and the constructor -

docs on the newtype and the constructor

N7 constructor -

constructor

s. -

.

C1 record constructor, with the following fields: -

record constructor, with the following fields:

p field -

field

q field -

field

s -

s -

C2 record constructor, also with some fields: -

record constructor, also with some fields:

Testing different record commenting styles -

Testing different record commenting styles

C3 record constructor -

record constructor

s1 record selector -

record selector

s2 record selector -

record selector

s3 record selector -

record selector

test that we can export record selectors on their own: -

test that we can export record selectors on their own:

Class declarations

C class) -

class)

a method -

method

b method -

method

This is a class declaration with no separate docs for the methods -

This is a class declaration with no separate docs for the methods

a

This is a class declaration with no methods (or no methods exported) -

This is a class declaration with no methods (or no methods exported)

Test that we can export a class method on its own: -

Test that we can export a class method on its own:

Function types

Foo. We can add emphasis like this. -

.

  • This is a bulleted list + >This is a bulleted list
  • This is the next item (different kind of bullet) + >This is the next item (different kind of bullet)
  1. This is an ordered list + >This is an ordered list
  2. This is the next item (different kind of bullet) + >This is the next item (different kind of bullet)
cat
a small, furry, domesticated mammal + >a small, furry, domesticated mammal
pineapple
a fruit grown in the tropics + >a fruit grown in the tropics
-     This is a block of code, which can include other markup:      This is a block of code, which can include other markup: R
 this is another block of code
-
this is another block of code

We can also include URLs in documentation: http://www.haskell.org/. -

.

CInt

we can export foreign declarations too -

we can export foreign declarations too

This is some documentation that is attached to a name ($aux1) rather than a source declaration. The documentation may be - referred to in the export list using its name. -

 code block in named doc

This is some documentation that is attached to a name ($aux2) -

This is some documentation that is attached to a name ($aux2)

a nested, named doc comment -

a nested, named doc comment

with a paragraph, -

with a paragraph,

 and a code block
test
-test1
-
 test2
   test3
@@ -1781,70 +1731,57 @@ test1
 	  >
-test1
+	  >test1
 test2
 
test3
-test4
-
-test1
+	  >test1
 test2
 
test3
-test4
-
test3
-test4
-
-test1
+	  >test1
 test2
 

aux11: -

aux11:

test3
-test4
-
-test1
+	  >test1
 test2
 
 foo
-
foo
 bar
-
bar

This is some inline documentation in the export list -

This is some inline documentation in the export list

 a code block using bird-tracks
  each line must begin with > (which isn't significant unless it
- is at the beginning of the line).
-

A hidden module

nested-style doc comments -

nested-style doc comments

Existential / Universal types

a

A data-type using existential/universal types -

A data-type using existential/universal types

T -

This argument has type 'T2 Int Int' -

This argument has type 'T2 Int Int'

This argument has type T3 Bool Bool -> T4 Float Float -

This argument has a very long description that should hopefully cause some wrapping to happen when it is finally - rendered by Haddock in the generated HTML page. -

()

This is the result type -

This is the result type

This is a function with documentation for each argument -

This is a function with documentation for each argument

)

takes a triple -

takes a triple

Int -

()

one of the arguments -

one of the arguments

and the return value -

and the return value

This function has some arg docs -

This function has some arg docs

The input float -

The input float

The output float -

The output float

A foreign import with argument docs -

A foreign import with argument docs

A subsection

 a literal line
-
a literal line

$ a non literal line $ -

line $

f' - but f' doesn't get link'd 'f\'' -

Comment on a definition with type signature -

Comment on a definition with type signature

:: t

Comment on a definition without type signature -

Comment on a definition without type signature

Addr# to the string, and the length of the string. -

to the string, and the length of the string.

bar. -

.

Also see Baz -

Comment -

Comment

:: a

A comment about f -

A comment about f

:- -

foo without a title -

bar with title -

a :: *

Type family G -

Type family G

A class with an associated type -

A class with an associated type

a :: * -> *

An associated type -

An associated type

A method -

A method

a

Doc for family -

Doc for family

γλώσσα -

γλώσσα

A section

A subsection

A subsection