From 43888034557c589a1cfe6e255433b086ee375bd2 Mon Sep 17 00:00:00 2001 From: David Waern Date: Sat, 28 Aug 2010 16:36:09 +0000 Subject: Update tests following switch to the Xhtml backend --- tests/golden-tests/tests/A.html.ref | 123 +- tests/golden-tests/tests/B.html.ref | 88 +- tests/golden-tests/tests/Bug1.html.ref | 156 +- tests/golden-tests/tests/Bug2.html.ref | 94 +- tests/golden-tests/tests/Bug3.html.ref | 120 +- tests/golden-tests/tests/Bug4.html.ref | 120 +- tests/golden-tests/tests/Bug6.html.ref | 490 +-- tests/golden-tests/tests/Bug7.html.ref | 252 +- tests/golden-tests/tests/Bug8.html.ref | 139 +- tests/golden-tests/tests/Bugs.html.ref | 124 +- tests/golden-tests/tests/CrossPackageDocs.html.ref | 548 +--- tests/golden-tests/tests/Examples.html.ref | 230 +- tests/golden-tests/tests/FunArgs.html.ref | 203 +- tests/golden-tests/tests/GADTRecords.html.ref | 295 +- tests/golden-tests/tests/Hash.html.ref | 494 +-- tests/golden-tests/tests/NamedDoc.html.ref | 103 +- tests/golden-tests/tests/NoLayout.hs | 2 +- tests/golden-tests/tests/NoLayout.html.ref | 122 +- tests/golden-tests/tests/NonGreedy.html.ref | 120 +- tests/golden-tests/tests/QuasiExpr.html.ref | 350 +-- tests/golden-tests/tests/QuasiQuote.html.ref | 94 +- tests/golden-tests/tests/TH.html.ref | 93 +- tests/golden-tests/tests/TH2.html.ref | 75 +- tests/golden-tests/tests/Test.html.ref | 3206 +------------------- tests/golden-tests/tests/Ticket112.html.ref | 121 +- tests/golden-tests/tests/Ticket61.html.ref | 133 +- tests/golden-tests/tests/Ticket75.html.ref | 179 +- tests/golden-tests/tests/TypeFamilies.html.ref | 325 +- tests/golden-tests/tests/TypeOperators.html.ref | 394 +-- tests/golden-tests/tests/Visible.html.ref | 95 +- 30 files changed, 337 insertions(+), 8551 deletions(-) (limited to 'tests') diff --git a/tests/golden-tests/tests/A.html.ref b/tests/golden-tests/tests/A.html.ref index 69567351..a2685a1e 100644 --- a/tests/golden-tests/tests/A.html.ref +++ b/tests/golden-tests/tests/A.html.ref @@ -1,119 +1,4 @@ - - -A
 ContentsIndex
A
Documentation
data A
Constructors
A
Produced by Haddock version 2.7.2
+A

 

A

Documentation

data A

Constructors

A 
\ No newline at end of file diff --git a/tests/golden-tests/tests/B.html.ref b/tests/golden-tests/tests/B.html.ref index 007d084b..0a971c13 100644 --- a/tests/golden-tests/tests/B.html.ref +++ b/tests/golden-tests/tests/B.html.ref @@ -1,84 +1,4 @@ - - -B
 ContentsIndex
B
Documentation
module A
Produced by Haddock version 2.7.2
+B

 

B

Documentation

module A

\ No newline at end of file diff --git a/tests/golden-tests/tests/Bug1.html.ref b/tests/golden-tests/tests/Bug1.html.ref index 861b7ee7..8e6a97f2 100644 --- a/tests/golden-tests/tests/Bug1.html.ref +++ b/tests/golden-tests/tests/Bug1.html.ref @@ -1,150 +1,6 @@ - - -Bug1
 ContentsIndex
Bug1
Synopsis
data T = T
Documentation
data T
We should have different anchors for constructors and types/classes. This - hyperlink should point to the type constructor by default: T. -
Constructors
T
Produced by Haddock version 2.7.2
+Bug1

 

Bug1

Synopsis

  • data T = T

Documentation

data T

We should have different anchors for constructors and types/classes. This + hyperlink should point to the type constructor by default: T. +

Constructors

T 
\ No newline at end of file diff --git a/tests/golden-tests/tests/Bug2.html.ref b/tests/golden-tests/tests/Bug2.html.ref index e344bd69..d887178e 100644 --- a/tests/golden-tests/tests/Bug2.html.ref +++ b/tests/golden-tests/tests/Bug2.html.ref @@ -1,90 +1,4 @@ - - -Bug2
 ContentsIndex
Bug2
Documentation
x :: A
Produced by Haddock version 2.7.2
+Bug2

 

Bug2

Documentation

x :: A

\ No newline at end of file diff --git a/tests/golden-tests/tests/Bug3.html.ref b/tests/golden-tests/tests/Bug3.html.ref index dc24ddd0..eec36ae3 100644 --- a/tests/golden-tests/tests/Bug3.html.ref +++ b/tests/golden-tests/tests/Bug3.html.ref @@ -1,116 +1,6 @@ - - -Bug3
 ContentsIndex
Bug3
Synopsis
foo :: Int
Documentation
foo :: Int
/multi-line +Bug3

Bug3

Synopsis

Documentation

foo :: Int

/multi-line emphasis/ -

Produced by Haddock version 2.7.2
+

\ No newline at end of file diff --git a/tests/golden-tests/tests/Bug4.html.ref b/tests/golden-tests/tests/Bug4.html.ref index 1a09fff3..58d36734 100644 --- a/tests/golden-tests/tests/Bug4.html.ref +++ b/tests/golden-tests/tests/Bug4.html.ref @@ -1,115 +1,5 @@ - - -Bug4
 ContentsIndex
Bug4
Synopsis
foo :: Int
Documentation
foo :: Int
don't use apostrophe's in the wrong place's -
Produced by Haddock version 2.7.2
+Bug4

 

Bug4

Synopsis

Documentation

foo :: Int

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

\ No newline at end of file diff --git a/tests/golden-tests/tests/Bug6.html.ref b/tests/golden-tests/tests/Bug6.html.ref index 3686fd6d..1d37b9b1 100644 --- a/tests/golden-tests/tests/Bug6.html.ref +++ b/tests/golden-tests/tests/Bug6.html.ref @@ -1,482 +1,12 @@ - - -Bug6
 ContentsIndex
Bug6
Description
Exporting records. -
Synopsis
data A = A Int
data B = B {
b :: Int
}
data C = C {
c1 :: Int
c2 :: Int
}
data D = D Int Int
newtype E = E Int
Documentation
data A
This record is exported without its field -
Constructors
A Int
data B
.. with its field, but the field is named separately in the export list +Bug6

Bug6

Description

Exporting records. +

Synopsis

Documentation

data A

This record is exported without its field +

Constructors

A Int 

data B

.. 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) -

Constructors
B
b :: Int
data C
.. with fields names as subordinate names in the export -
Constructors
C
c1 :: Int
c2 :: Int
data D
.. with only some of the fields exported (we can't handle this one - +

Constructors

B 

Fields

b :: Int
 

data C

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

Constructors

C 

Fields

c1 :: Int
 
c2 :: Int
 

data D

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

Constructors
D Int Int
newtype E
a newtype with a field -
Constructors
E Int
Produced by Haddock version 2.7.2
+

Constructors

D Int Int 

newtype E

a newtype with a field +

Constructors

E Int 
\ No newline at end of file diff --git a/tests/golden-tests/tests/Bug7.html.ref b/tests/golden-tests/tests/Bug7.html.ref index 83ce5323..1601266b 100644 --- a/tests/golden-tests/tests/Bug7.html.ref +++ b/tests/golden-tests/tests/Bug7.html.ref @@ -1,244 +1,10 @@ - - -Bug7
 ContentsIndex
Bug7
Description
This module caused a duplicate instance in the documentation for the Foo +Bug7

Bug7

Description

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

Synopsis
data Foo = Foo
class Bar x y
Documentation
data Foo
The Foo datatype -
Constructors
Foo
show/hide Instances
Bar Foo FooJust one instance -
class Bar x y
The Bar class -
show/hide Instances
Bar Foo FooJust one instance -
Produced by Haddock version 2.7.2
+

Synopsis

Documentation

data Foo

The Foo datatype +

Constructors

Foo 

Instances

Bar Foo Foo

Just one instance +

class Bar x y

The Bar class +

Instances

Bar Foo Foo

Just one instance +

\ No newline at end of file diff --git a/tests/golden-tests/tests/Bug8.html.ref b/tests/golden-tests/tests/Bug8.html.ref index 907602b7..198a2039 100644 --- a/tests/golden-tests/tests/Bug8.html.ref +++ b/tests/golden-tests/tests/Bug8.html.ref @@ -1,135 +1,4 @@ - - -Bug8
 ContentsIndex
Bug8
Documentation
data Typ
Constructors
Type (String, [Typ])
TFree (String, [String])
Produced by Haddock version 2.7.2
+Bug8

 

Bug8

Documentation

data Typ

Constructors

Type (String, [Typ]) 
TFree (String, [String]) 
\ No newline at end of file diff --git a/tests/golden-tests/tests/Bugs.html.ref b/tests/golden-tests/tests/Bugs.html.ref index 75666af0..6d4f20ed 100644 --- a/tests/golden-tests/tests/Bugs.html.ref +++ b/tests/golden-tests/tests/Bugs.html.ref @@ -1,120 +1,4 @@ - - -Bugs
 ContentsIndex
Bugs
Documentation
data A a
Constructors
A a (a -> Int)
Produced by Haddock version 2.7.2
+Bugs

 

Bugs

Documentation

data A a

Constructors

A a (a -> Int) 
\ No newline at end of file diff --git a/tests/golden-tests/tests/CrossPackageDocs.html.ref b/tests/golden-tests/tests/CrossPackageDocs.html.ref index 375984dc..d62b64e4 100644 --- a/tests/golden-tests/tests/CrossPackageDocs.html.ref +++ b/tests/golden-tests/tests/CrossPackageDocs.html.ref @@ -1,525 +1,43 @@ - - -CrossPackageDocs
 ContentsIndex
CrossPackageDocs
Synopsis
map :: (a -> b) -> [a] -> [b]
class Monad m where
(>>=) :: m a -> (a -> m b) -> m b
(>>) :: m a -> m b -> m b
return :: a -> m a
fail :: String -> m a
runInteractiveProcess :: FilePath -> [String] -> Maybe FilePath -> Maybe [(String, String)] -> IO (Handle, Handle, Handle, ProcessHandle)
Documentation
map :: (a -> b) -> [a] -> [b]

map f xs is the list obtained by applying f to each element - of xs, i.e., -

map f [x1, x2, ..., xn] == [f x1, f x2, ..., f xn] +CrossPackageDocs

CrossPackageDocs

Synopsis

Documentation

map :: (a -> b) -> [a] -> [b]

map f xs is the list obtained by applying f to each element + of xs, i.e., +

map f [x1, x2, ..., xn] == [f x1, f x2, ..., f xn] map f [x1, x2, ...] == [f x1, f x2, ...] -
class Monad m where

The Monad class defines the basic operations over a monad, -a concept from a branch of mathematics known as category theory. +

class Monad m where

The Monad class defines the basic operations over a monad, +a concept from a branch of mathematics known as category theory. From the perspective of a Haskell programmer, however, it is best to -think of a monad as an abstract datatype of actions. -Haskell's do expressions provide a convenient syntax for writing +think of a monad as an abstract datatype of actions. +Haskell's do expressions provide a convenient syntax for writing monadic expressions. -

Minimal complete definition: >>= and return. -

Instances of Monad should satisfy the following laws: -

return a >>= k == k a +

Minimal complete definition: >>= and return. +

Instances of Monad should satisfy the following laws: +

return a >>= k == k a m >>= return == m m >>= (\x -> k x >>= h) == (m >>= k) >>= h -

Instances of both Monad and Functor should additionally satisfy the law: -

fmap f xs == xs >>= return . f -

The instances of Monad for lists, Data.Maybe.Maybe and System.IO.IO -defined in the Prelude satisfy these laws. -

Methods
(>>=) :: m a -> (a -> m b) -> m b
Sequentially compose two actions, passing any value produced +

Instances of both Monad and Functor should additionally satisfy the law: +

fmap f xs == xs >>= return . f +

The instances of Monad for lists, Data.Maybe.Maybe and System.IO.IO +defined in the Prelude satisfy these laws. +

Methods

(>>=) :: m a -> (a -> m b) -> m b

Sequentially compose two actions, passing any value produced by the first as an argument to the second. -

(>>) :: m a -> m b -> m b
Sequentially compose two actions, discarding any value produced +

(>>) :: m a -> m b -> m b

Sequentially compose two actions, discarding any value produced by the first, like sequencing operators (such as the semicolon) in imperative languages. -

return :: a -> m a
Inject a value into the monadic type. -
fail :: String -> m a
Fail with a message. This operation is not part of the +

return :: a -> m a

Inject a value into the monadic type. +

fail :: String -> m a

Fail with a message. This operation is not part of the mathematical definition of a monad, but is invoked on pattern-match - failure in a do expression. -

show/hide Instances
runInteractiveProcess
:: FilePathFilename of the executable -
-> [String]Arguments to pass to the executable -
-> Maybe FilePathOptional path to the working directory -
-> Maybe [(String, String)]Optional environment (otherwise inherit) -
-> IO (Handle, Handle, Handle, ProcessHandle)

Runs a raw command, and returns Handles that may be used to communicate - with the process via its stdin, stdout and stderr respectively. -

For example, to start a process and feed a string to its stdin: -

(inp,out,err,pid) <- runInteractiveProcess "..." + failure in a do expression. +

Instances

Monad [] 
Monad IO 
Monad Q 
Monad Maybe 
Monad ((->) r) 

runInteractiveProcess

Arguments

:: FilePath

Filename of the executable +

-> [String]

Arguments to pass to the executable +

-> Maybe FilePath

Optional path to the working directory +

-> Maybe [(String, String)]

Optional environment (otherwise inherit) +

-> IO (Handle, Handle, Handle, ProcessHandle) 

Runs a raw command, and returns Handles that may be used to communicate + with the process via its stdin, stdout and stderr respectively. +

For example, to start a process and feed a string to its stdin: +

(inp,out,err,pid) <- runInteractiveProcess "..." forkIO (hPutStr inp str) -

The Handles are initially in binary mode; if you need them to be - in text mode then use hSetBinaryMode. -

Produced by Haddock version 2.7.2
+

The Handles are initially in binary mode; if you need them to be + in text mode then use hSetBinaryMode. +

\ No newline at end of file diff --git a/tests/golden-tests/tests/Examples.html.ref b/tests/golden-tests/tests/Examples.html.ref index 64634d26..5dc3885a 100644 --- a/tests/golden-tests/tests/Examples.html.ref +++ b/tests/golden-tests/tests/Examples.html.ref @@ -1,208 +1,22 @@ - - -Examples
 ContentsIndex
Examples
Synopsis
fib :: Integer -> Integer
Documentation
fib :: Integer -> Integer

Fibonacci number of given Integer. -

Examples: -

ghci> fib 5
-5
-ghci> fib 10
-55
-
ghci> fib 10
-55
-

One more Example: -

ghci> fib 5
-5
-

One more Example: -

ghci> fib 5
-5
-

Example with an import: -

ghci> import Data.Char
-ghci> isSpace 'a'
-False
-
Produced by Haddock version 2.7.2
+Examples

 

Examples

Synopsis

Documentation

fib :: Integer -> Integer

Fibonacci number of given Integer. +

Examples: +

ghci> fib 5
+5
+ghci> fib 10
+55
+
ghci> fib 10
+55
+

One more Example: +

ghci> fib 5
+5
+

One more Example: +

ghci> fib 5
+5
+

Example with an import: +

ghci> import Data.Char
+ghci> isSpace 'a'
+False
+
\ No newline at end of file diff --git a/tests/golden-tests/tests/FunArgs.html.ref b/tests/golden-tests/tests/FunArgs.html.ref index f6c34bd4..7ee8220d 100644 --- a/tests/golden-tests/tests/FunArgs.html.ref +++ b/tests/golden-tests/tests/FunArgs.html.ref @@ -1,190 +1,13 @@ - - -FunArgs
 ContentsIndex
FunArgs
Documentation
f
:: forall a . Ord a
=> IntFirst argument -
-> aSecond argument -
-> BoolThird argument -
-> (a -> a)Fourth argument -
-> ()Result -
g
:: aFirst argument -
-> bSecond argument -
-> cThird argument -
-> dResult -
Produced by Haddock version 2.7.2
+FunArgs

 

FunArgs

Documentation

f

Arguments

:: forall a . Ord a 
=> Int

First argument +

-> a

Second argument +

-> Bool

Third argument +

-> (a -> a)

Fourth argument +

-> ()

Result +

g

Arguments

:: a

First argument +

-> b

Second argument +

-> c

Third argument +

-> d

Result +

\ No newline at end of file diff --git a/tests/golden-tests/tests/GADTRecords.html.ref b/tests/golden-tests/tests/GADTRecords.html.ref index 3875b1c6..ae0f7f24 100644 --- a/tests/golden-tests/tests/GADTRecords.html.ref +++ b/tests/golden-tests/tests/GADTRecords.html.ref @@ -1,288 +1,7 @@ - - -GADTRecords
 ContentsIndex
GADTRecords
Synopsis
data H1 a b where
C1 :: H1 a b
C2 :: Ord a => [a] -> H1 a a
C3 :: {
field :: Int
} -> H1 Int Int
C4 :: {
field2 :: a
} -> H1 Int a
Documentation
data H1 a b where
h1 -
Constructors
C1 :: H1 a b
C2 :: Ord a => [a] -> H1 a a
C3 :: Int -> H1 Int Int
field :: Inthello docs -
C4 :: a -> H1 Int a
field2 :: ahello2 docs -
Produced by Haddock version 2.7.2
+GADTRecords

 

GADTRecords

Synopsis

Documentation

data H1 a b where

h1 +

Constructors

C1 :: H1 a b 
C2 :: Ord a => [a] -> H1 a a 
C3 :: Int -> H1 Int Int 

Fields

field :: Int

hello docs +

C4 :: a -> H1 Int a 

Fields

field2 :: a

hello2 docs +

\ No newline at end of file diff --git a/tests/golden-tests/tests/Hash.html.ref b/tests/golden-tests/tests/Hash.html.ref index 3362368a..1b9dd550 100644 --- a/tests/golden-tests/tests/Hash.html.ref +++ b/tests/golden-tests/tests/Hash.html.ref @@ -1,476 +1,20 @@ - - -Hash
 ContentsIndex
Hash
Contents
The HashTable type -
Operations on HashTables -
The Hash class -
Description
Implementation of fixed-size hash tables, with a type +Hash

Hash

Description

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

Synopsis
data HashTable key val
new :: (Eq key, Hash key) => Int -> IO (HashTable key val)
insert :: (Eq key, Hash key) => key -> val -> IO ()
lookup :: Hash key => key -> IO (Maybe val)
class Hash a where
hash :: a -> Int
The HashTable type -
data HashTable key val
A hash table with keys of type key and values of type val. - The type key should be an instance of Eq. -
Operations on HashTables -
new :: (Eq key, Hash key) => Int -> IO (HashTable key val)
Builds a new hash table with a given size -
insert :: (Eq key, Hash key) => key -> val -> IO ()
Inserts a new element into the hash table -
lookup :: Hash key => key -> IO (Maybe val)
Looks up a key in the hash table, returns Just val if the key - was found, or Nothing otherwise. -
The Hash class -
class Hash a where
A class of types which can be hashed. -
Methods
hash :: a -> Int
hashes the value of type a into an Int -
show/hide Instances
Hash Float
Hash Int
(Hash a, Hash b) => Hash (a, b)
Produced by Haddock version 2.7.2
+

Synopsis

The HashTable type +

data HashTable key val

A hash table with keys of type key and values of type val. + The type key should be an instance of Eq. +

Operations on HashTables +

new :: (Eq key, Hash key) => Int -> IO (HashTable key val)

Builds a new hash table with a given size +

insert :: (Eq key, Hash key) => key -> val -> IO ()

Inserts a new element into the hash table +

lookup :: Hash key => key -> IO (Maybe val)

Looks up a key in the hash table, returns Just val if the key + was found, or Nothing otherwise. +

The Hash class +

class Hash a where

A class of types which can be hashed. +

Methods

hash :: a -> Int

hashes the value of type a into an Int +

Instances

Hash Float 
Hash Int 
(Hash a, Hash b) => Hash (a, b) 
\ No newline at end of file diff --git a/tests/golden-tests/tests/NamedDoc.html.ref b/tests/golden-tests/tests/NamedDoc.html.ref index 3b1b7f1e..d649e67f 100644 --- a/tests/golden-tests/tests/NamedDoc.html.ref +++ b/tests/golden-tests/tests/NamedDoc.html.ref @@ -1,98 +1,5 @@ - - -NamedDoc
 ContentsIndex
NamedDoc
Synopsis
Documentation
bar -
Produced by Haddock version 2.7.2
+NamedDoc

 

NamedDoc

Synopsis

    Documentation

    bar +

    \ No newline at end of file diff --git a/tests/golden-tests/tests/NoLayout.hs b/tests/golden-tests/tests/NoLayout.hs index ac8e58bb..19b38b1d 100644 --- a/tests/golden-tests/tests/NoLayout.hs +++ b/tests/golden-tests/tests/NoLayout.hs @@ -4,7 +4,7 @@ -- This should probably be changed. module NoLayout where { - -- | the class 'C' + -- | the function 'g' ; g :: Int; g = undefined diff --git a/tests/golden-tests/tests/NoLayout.html.ref b/tests/golden-tests/tests/NoLayout.html.ref index 03128b86..e36b1c47 100644 --- a/tests/golden-tests/tests/NoLayout.html.ref +++ b/tests/golden-tests/tests/NoLayout.html.ref @@ -1,117 +1,5 @@ - - -NoLayout
     ContentsIndex
    NoLayout
    Synopsis
    g :: Int
    Documentation
    g :: Int
    the class C -
    Produced by Haddock version 2.7.2
    +NoLayout

     

    NoLayout

    Synopsis

    Documentation

    g :: Int

    the function g +

    \ No newline at end of file diff --git a/tests/golden-tests/tests/NonGreedy.html.ref b/tests/golden-tests/tests/NonGreedy.html.ref index 670fc34a..6910de26 100644 --- a/tests/golden-tests/tests/NonGreedy.html.ref +++ b/tests/golden-tests/tests/NonGreedy.html.ref @@ -1,115 +1,5 @@ - - -NonGreedy
     ContentsIndex
    NonGreedy
    Synopsis
    f :: a
    Documentation
    f :: a
    url1 url2 -
    Produced by Haddock version 2.7.2
    +NonGreedy

     

    NonGreedy

    Synopsis

    • f :: a

    Documentation

    f :: a

    \ No newline at end of file diff --git a/tests/golden-tests/tests/QuasiExpr.html.ref b/tests/golden-tests/tests/QuasiExpr.html.ref index 2cb316b1..a7faca6b 100644 --- a/tests/golden-tests/tests/QuasiExpr.html.ref +++ b/tests/golden-tests/tests/QuasiExpr.html.ref @@ -1,346 +1,4 @@ - - -QuasiExpr
     ContentsIndex
    QuasiExpr
    Documentation
    data Expr
    Constructors
    IntExpr Integer
    AntiIntExpr String
    BinopExpr BinOp Expr Expr
    AntiExpr String
    show/hide Instances
    data BinOp
    Constructors
    AddOp
    SubOp
    MulOp
    DivOp
    show/hide Instances
    eval :: Expr -> Integer
    parseExprExp :: String -> Q Exp
    Produced by Haddock version 2.7.2
    +QuasiExpr

     

    QuasiExpr

    Documentation

    data BinOp

    Constructors

    AddOp 
    SubOp 
    MulOp 
    DivOp 

    parseExprExp :: String -> Q Exp

    \ No newline at end of file diff --git a/tests/golden-tests/tests/QuasiQuote.html.ref b/tests/golden-tests/tests/QuasiQuote.html.ref index 4de6086b..1747c539 100644 --- a/tests/golden-tests/tests/QuasiQuote.html.ref +++ b/tests/golden-tests/tests/QuasiQuote.html.ref @@ -1,90 +1,4 @@ - - -QuasiQuote
     ContentsIndex
    QuasiQuote
    Documentation
    val :: Integer
    Produced by Haddock version 2.7.2
    +QuasiQuote

     

    QuasiQuote

    Documentation

    \ No newline at end of file diff --git a/tests/golden-tests/tests/TH.html.ref b/tests/golden-tests/tests/TH.html.ref index 4d2e0b09..3b636405 100644 --- a/tests/golden-tests/tests/TH.html.ref +++ b/tests/golden-tests/tests/TH.html.ref @@ -1,89 +1,4 @@ - - -TH
     ContentsIndex
    TH
    Documentation
    decl :: Q [Dec]
    Produced by Haddock version 2.7.2
    +TH

     

    TH

    Documentation

    decl :: Q [Dec]

    \ No newline at end of file diff --git a/tests/golden-tests/tests/TH2.html.ref b/tests/golden-tests/tests/TH2.html.ref index f7aaf18f..63b4a7ba 100644 --- a/tests/golden-tests/tests/TH2.html.ref +++ b/tests/golden-tests/tests/TH2.html.ref @@ -1,71 +1,4 @@ - - -TH2
     ContentsIndex
    TH2
    Produced by Haddock version 2.7.2
    +TH2

     

    TH2

    \ No newline at end of file diff --git a/tests/golden-tests/tests/Test.html.ref b/tests/golden-tests/tests/Test.html.ref index 3c839612..bbf501b8 100644 --- a/tests/golden-tests/tests/Test.html.ref +++ b/tests/golden-tests/tests/Test.html.ref @@ -1,3110 +1,148 @@ - - -Test
     ContentsIndex
    Test
    Portabilityportable
    Stabilityprovisional
    Maintainerlibraries@haskell.org
    Contents
    Type declarations -
    Data types -
    Records -
    Class declarations -
    Function types -
    Auxiliary stuff -
    A hidden module -
    A visible module -
    Existential / Universal types -
    Type signatures with argument docs -
    A section -
    A subsection -
    Description
    This module illustrates & tests most of the features of Haddock. - Testing references from the description: T, f, g, visible. -
    Synopsis
    data T a b
    = A Int (Maybe Float)
    | B (T a b, T Int Float)
    data T2 a b
    data T3 a b
    = A1 a
    | B1 b
    data T4 a b
    = A2 a
    | B2 b
    data T5 a b
    = A3 a
    | B3 b
    data T6
    = A4
    | B4
    | C4
    newtype N1 a = N1 a
    newtype N2 a b = N2 {
    n :: a b
    }
    newtype N3 a b = N3 {
    n3 :: a b
    }
    data N4 a b
    newtype N5 a b = N5 {
    n5 :: a b
    }
    newtype N6 a b = N6 {
    n6 :: a b
    }
    newtype N7 a b = N7 {
    n7 :: a b
    }
    data R
    = C1 {
    p :: Int
    q :: forall a. a -> a
    r :: Int
    s :: Int
    }
    | C2 {
    t :: T1 -> T2 Int Int -> T3 Bool Bool -> T4 Float Float -> T5 () ()
    u :: Int
    v :: Int
    }
    data R1 = C3 {
    s1 :: Int
    s2 :: Int
    s3 :: Int
    }
    class D a => C a where
    a :: IO a
    b :: [a]
    class D a where
    d :: T a b
    e :: (a, a)
    class E a
    class F a where
    ff :: a
    f :: C a => a -> Int
    g :: Int -> IO CInt
    hidden :: Int -> Int
    module Visible
    data Ex a
    = forall b . C b => Ex1 b
    | forall b . Ex2 b
    | forall b . C a => Ex3 b
    | Ex4 (forall a. a -> a)
    k :: T () () -> T2 Int Int -> (T3 Bool Bool -> T4 Float Float) -> T5 () () -> IO ()
    l :: (Int, Int, Float) -> Int
    m :: R -> N1 () -> IO Int
    o :: Float -> IO Float
    f' :: Int
    Type declarations -
    Data types -
    data T a b
    This comment applies to the following declaration +Test
    Portability
    portable
    Stability
    provisional
    Maintainer
    libraries@haskell.org

    Test

    Description

    This module illustrates & tests most of the features of Haddock. + Testing references from the description: T, f, g, visible. +

    Synopsis

    Type declarations +

    Data types +

    data T a b

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

    Constructors
    A Int (Maybe Float)This comment describes the A constructor -
    B (T a b, T Int Float)This comment describes the B constructor -
    data T2 a b
    An abstract data declaration -
    data T3 a b
    A data declaration with no documentation annotations on the constructors -
    Constructors
    A1 a
    B1 b
    data T4 a b
    Constructors
    A2 a
    B2 b
    data T5 a b
    Constructors
    A3 adocuments A3 -
    B3 bdocuments B3 -
    data T6
    Testing alternative comment styles -
    Constructors
    A4This is the doc for A4 -
    B4This is the doc for B4 -
    C4This is the doc for C4 -
    newtype N1 a
    A newtype -
    Constructors
    N1 a
    newtype N2 a b
    A newtype with a fieldname -
    Constructors
    N2
    n :: a b
    newtype N3 a b
    A newtype with a fieldname, documentation on the field -
    Constructors
    N3
    n3 :: a bthis is the n3 field -
    data N4 a b
    An abstract newtype - we show this one as data rather than newtype because +

    Constructors

    A Int (Maybe Float)

    This comment describes the A constructor +

    B (T a b, T Int Float)

    This comment describes the B constructor +

    data T2 a b

    An abstract data declaration +

    data T3 a b

    A data declaration with no documentation annotations on the constructors +

    Constructors

    A1 a 
    B1 b 

    data T4 a b

    Constructors

    A2 a 
    B2 b 

    data T5 a b

    Constructors

    A3 a

    documents A3 +

    B3 b

    documents B3 +

    data T6

    Testing alternative comment styles +

    Constructors

    A4

    This is the doc for A4 +

    B4

    This is the doc for B4 +

    C4

    This is the doc for C4 +

    newtype N1 a

    A newtype +

    Constructors

    N1 a 

    newtype N2 a b

    A newtype with a fieldname +

    Constructors

    N2 

    Fields

    n :: a b
     

    newtype N3 a b

    A newtype with a fieldname, documentation on the field +

    Constructors

    N3 

    Fields

    n3 :: a b

    this is the n3 field +

    data N4 a b

    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. -

    newtype N5 a b
    Constructors
    N5
    n5 :: a bno docs on the datatype or the constructor -
    newtype N6 a b
    Constructors
    N6docs on the constructor only -
    n6 :: a b
    newtype N7 a b
    docs on the newtype and the constructor -
    Constructors
    N7The N7 constructor -
    n7 :: a b
    Records -
    data R
    This is the documentation for the R record, which has four fields, - p, q, r, and s. -
    Constructors
    C1This is the C1 record constructor, with the following fields: -
    p :: IntThis comment applies to the p field -
    q :: forall a. a -> aThis comment applies to the q field -
    r :: IntThis comment applies to both r and s -
    s :: IntThis comment applies to both r and s -
    C2This is the C2 record constructor, also with some fields: -
    t :: T1 -> T2 Int Int -> T3 Bool Bool -> T4 Float Float -> T5 () ()
    u :: Int
    v :: Int
    data R1
    Testing different record commenting styles -
    Constructors
    C3This is the C3 record constructor -
    s1 :: IntThe s1 record selector -
    s2 :: IntThe s2 record selector -
    s3 :: IntThe s3 record selector -
    test that we can export record selectors on their own: -
    Class declarations -
    class D a => C a where
    This comment applies to the previous declaration (the C class) -
    Methods
    a :: IO a
    this is a description of the a method -
    b :: [a]
    this is a description of the b method -
    class D a where
    This is a class declaration with no separate docs for the methods -
    Methods
    d :: T a b
    e :: (a, a)
    show/hide Instances
    class E a
    This is a class declaration with no methods (or no methods exported) -
    class F a where
    Methods
    ff :: a
    Test that we can export a class method on its own: -
    Function types -
    f :: C a => a -> Int

    In a comment string we can refer to identifiers in scope with -single quotes like this: T, and we can refer to modules by -using double quotes: Foo. We can add emphasis like this. -

    • This is a bulleted list -
    • This is the next item (different kind of bullet) -
    1. This is an ordered list -

    2. This is the next item (different kind of bullet) -

    -     This is a block of code, which can include other markup: R
    +

    newtype N5 a b

    Constructors

    N5 

    Fields

    n5 :: a b

    no docs on the datatype or the constructor +

    newtype N6 a b

    Constructors

    N6

    docs on the constructor only +

    Fields

    n6 :: a b
     

    newtype N7 a b

    docs on the newtype and the constructor +

    Constructors

    N7

    The N7 constructor +

    Fields

    n7 :: a b
     

    Records +

    data R

    This is the documentation for the R record, which has four fields, + p, q, r, and s. +

    Constructors

    C1

    This is the C1 record constructor, with the following fields: +

    Fields

    p :: Int

    This comment applies to the p field +

    q :: forall a. a -> a

    This comment applies to the q field +

    r :: Int

    This comment applies to both r and s +

    s :: Int

    This comment applies to both r and s +

    C2

    This is the C2 record constructor, also with some fields: +

    Fields

    t :: T1 -> T2 Int Int -> T3 Bool Bool -> T4 Float Float -> T5 () ()
     
    u :: Int
     
    v :: Int
     

    data R1

    Testing different record commenting styles +

    Constructors

    C3

    This is the C3 record constructor +

    Fields

    s1 :: Int

    The s1 record selector +

    s2 :: Int

    The s2 record selector +

    s3 :: Int

    The s3 record selector +

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

    Class declarations +

    class D a => C a where

    This comment applies to the previous declaration (the C class) +

    Methods

    a :: IO a

    this is a description of the a method +

    b :: [a]

    this is a description of the b method +

    class D a where

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

    Methods

    d :: T a b

    e :: (a, a)

    Instances

    class E a

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

    class F a where

    Methods

    ff :: a

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

    Function types +

    f :: C a => a -> Int

    In a comment string we can refer to identifiers in scope with +single quotes like this: T, and we can refer to modules by +using double quotes: Foo. We can add emphasis like this. +

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

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

    g :: Int -> IO CInt
    we can export foreign declarations too -
    Auxiliary stuff -

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

     this is another block of code
    +

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

    g :: Int -> IO CInt

    we can export foreign declarations too +

    Auxiliary stuff +

    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) -
     code block on its own in named doc
     code block on its own in named doc (after newline)

    a nested, named doc comment -

    with a paragraph, -

     and a code block
    test
    +

     code block in named doc

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

     code block on its own in named doc
     code block on its own in named doc (after newline)

    a nested, named doc comment +

    with a paragraph, +

     and a code block
    test
     test1
    -
     test2
    +
     test2
       test3
    -
    +
     test1
     test2
    -
    test3
    +
    test3
     test4
    -
    +
     test1
     test2
    -
    test3
    +
    test3
     test4
    -
    test3
    +
    test3
     test4
    -
    +
     test1
     test2
    -

    aux11: -

    test3
    +

    aux11: +

    test3
     test4
    -
    +
     test1
     test2
    -
     foo
    -
     bar
    -

    This is some inline documentation in the export list -

     a code block using bird-tracks
    +
     foo
    +
     bar
    +

    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 -
    hidden :: Int -> Int
    A visible module -
    module Visible
    nested-style doc comments -
    Existential / Universal types -
    data Ex a
    A data-type using existential/universal types -
    Constructors
    forall b . C b => Ex1 b
    forall b . Ex2 b
    forall b . C a => Ex3 b
    Ex4 (forall a. a -> a)
    Type signatures with argument docs -
    k
    :: T () ()This argument has type T -
    -> T2 Int IntThis argument has type 'T2 Int Int' -
    -> (T3 Bool Bool -> T4 Float Float)This argument has type T3 Bool Bool -> T4 Float Float -
    -> T5 () ()This argument has a very long description that should +

    A hidden module +

    hidden :: Int -> Int

    A visible module +

    module Visible

    nested-style doc comments +

    Existential / Universal types +

    data Ex a

    A data-type using existential/universal types +

    Constructors

    forall b . C b => Ex1 b 
    forall b . Ex2 b 
    forall b . C a => Ex3 b 
    Ex4 (forall a. a -> a) 

    Type signatures with argument docs +

    k

    Arguments

    :: T () ()

    This argument has type T +

    -> T2 Int Int

    This argument has type 'T2 Int Int' +

    -> (T3 Bool Bool -> T4 Float Float)

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

    -> T5 () ()

    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. -

    -> IO ()This is the result type -
    This is a function with documentation for each argument -
    l
    :: (Int, Int, Float)takes a triple -
    -> Intreturns an Int -
    m
    :: R
    -> N1 ()one of the arguments -
    -> IO Intand the return value -
    This function has some arg docs -
    o
    :: FloatThe input float -
    -> IO FloatThe output float -
    A foreign import with argument docs -
    A section -
    A subsection -
     a literal line
    -

    $ a non literal line $ -

    f' :: Int
    a function with a prime can be referred to as f' +

    -> IO ()

    This is the result type +

    This is a function with documentation for each argument +

    l

    Arguments

    :: (Int, Int, Float)

    takes a triple +

    -> Int

    returns an Int +

    m

    Arguments

    :: R 
    -> N1 ()

    one of the arguments +

    -> IO Int

    and the return value +

    This function has some arg docs +

    o

    Arguments

    :: Float

    The input float +

    -> IO Float

    The output float +

    A foreign import with argument docs +

    A section +

    A subsection +

     a literal line
    +

    $ a non literal line $ +

    f' :: Int

    a function with a prime can be referred to as f' but f' doesn't get link'd 'f\'' -

    Produced by Haddock version 2.7.2
    +

    \ No newline at end of file diff --git a/tests/golden-tests/tests/Ticket112.html.ref b/tests/golden-tests/tests/Ticket112.html.ref index 9ff3a192..91ab5c2f 100644 --- a/tests/golden-tests/tests/Ticket112.html.ref +++ b/tests/golden-tests/tests/Ticket112.html.ref @@ -1,116 +1,5 @@ - - -Ticket112
     ContentsIndex
    Ticket112
    Synopsis
    f :: a
    Documentation
    f :: a
    ...given a raw Addr# to the string, and the length of the string. -
    Produced by Haddock version 2.7.2
    +Ticket112

     

    Ticket112

    Synopsis

    • f :: a

    Documentation

    f :: a

    ...given a raw Addr# to the string, and the length of the string. +

    \ No newline at end of file diff --git a/tests/golden-tests/tests/Ticket61.html.ref b/tests/golden-tests/tests/Ticket61.html.ref index 7931bbf8..bfdaa4df 100644 --- a/tests/golden-tests/tests/Ticket61.html.ref +++ b/tests/golden-tests/tests/Ticket61.html.ref @@ -1,128 +1,5 @@ - - -Ticket61
     ContentsIndex
    Ticket61
    Documentation
    class C a where
    Methods
    f :: a
    A comment about f -
    Produced by Haddock version 2.7.2
    +Ticket61

     

    Ticket61

    Documentation

    class C a where

    Methods

    f :: a

    A comment about f +

    \ No newline at end of file diff --git a/tests/golden-tests/tests/Ticket75.html.ref b/tests/golden-tests/tests/Ticket75.html.ref index 1490c1dc..e84010e1 100644 --- a/tests/golden-tests/tests/Ticket75.html.ref +++ b/tests/golden-tests/tests/Ticket75.html.ref @@ -1,174 +1,5 @@ - - -Ticket75
     ContentsIndex
    Ticket75
    Synopsis
    data a :- b = Q
    f :: Int
    Documentation
    data a :- b
    Constructors
    Q
    f :: Int
    A reference to :- -
    Produced by Haddock version 2.7.2
    +Ticket75

     

    Ticket75

    Synopsis

    Documentation

    data a :- b

    Constructors

    Q 

    f :: Int

    A reference to :- +

    \ No newline at end of file diff --git a/tests/golden-tests/tests/TypeFamilies.html.ref b/tests/golden-tests/tests/TypeFamilies.html.ref index 101c5c80..b649aced 100644 --- a/tests/golden-tests/tests/TypeFamilies.html.ref +++ b/tests/golden-tests/tests/TypeFamilies.html.ref @@ -1,316 +1,9 @@ - - -TypeFamilies
     ContentsIndex
    TypeFamilies
    Synopsis
    type family G a :: *
    class A a where
    data B a :: * -> *
    f :: B a Int
    type family F a
    Documentation
    type family G a :: *
    Type family G -
    class A a where
    A class with an associated type -
    Associated Types
    data B a :: * -> *
    An associated type -
    Methods
    f :: B a Int
    A method -
    show/hide Instances
    type family F a
    Doc for family -
    Produced by Haddock version 2.7.2
    +TypeFamilies

     

    TypeFamilies

    Synopsis

    • type family G a :: *
    • class A a where
      • data B a :: * -> *
      • f :: B a Int
    • type family F a

    Documentation

    type family G a :: *

    Type family G +

    class A a where

    A class with an associated type +

    Associated Types

    data B a :: * -> *

    An associated type +

    Methods

    f :: B a Int

    A method +

    Instances

    A Int 

    type family F a

    Doc for family +

    \ No newline at end of file diff --git a/tests/golden-tests/tests/TypeOperators.html.ref b/tests/golden-tests/tests/TypeOperators.html.ref index 787737e7..f1e4bc35 100644 --- a/tests/golden-tests/tests/TypeOperators.html.ref +++ b/tests/golden-tests/tests/TypeOperators.html.ref @@ -1,388 +1,6 @@ - - -TypeOperators
     ContentsIndex
    TypeOperators
    Contents
    stuff -
    Synopsis
    data a :-: b
    data (a :+: b) c
    data Op a b
    newtype O g f a = O {
    unO :: g (f a)
    }
    biO :: (g `O` f) a
    newtype Flip (~>) b a = Flip {
    unFlip :: a ~> b
    }
    stuff -
    data a :-: b
    data (a :+: b) c
    data Op a b
    newtype O g f a
    Constructors
    O
    unO :: g (f a)
    biO :: (g `O` f) a
    newtype Flip (~>) b a
    Constructors
    Flip
    unFlip :: a ~> b
    Produced by Haddock version 2.7.2
    +TypeOperators

     

    TypeOperators

    Contents

    Synopsis

    stuff +

    data a :-: b

    data (a :+: b) c

    data Op a b

    newtype O g f a

    Constructors

    O 

    Fields

    unO :: g (f a)
     

    biO :: (g `O` f) a

    newtype Flip (~>) b a

    Constructors

    Flip 

    Fields

    unFlip :: a ~> b
     
    \ No newline at end of file diff --git a/tests/golden-tests/tests/Visible.html.ref b/tests/golden-tests/tests/Visible.html.ref index 5a16acb0..92975799 100644 --- a/tests/golden-tests/tests/Visible.html.ref +++ b/tests/golden-tests/tests/Visible.html.ref @@ -1,91 +1,4 @@ - - -Visible
     ContentsIndex
    Visible
    Documentation
    visible :: Int -> Int
    Produced by Haddock version 2.7.2
    +Visible

     

    Visible

    Documentation

    \ No newline at end of file -- cgit v1.2.3