From 78a941372e7720b74a18ac259bf227512486dda1 Mon Sep 17 00:00:00 2001 From: simonmar Date: Tue, 23 Jul 2002 08:43:02 +0000 Subject: [haddock @ 2002-07-23 08:43:02 by simonmar] more tests --- examples/Test.hs | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) (limited to 'examples/Test.hs') diff --git a/examples/Test.hs b/examples/Test.hs index 2ad444b1..4acdc595 100644 --- a/examples/Test.hs +++ b/examples/Test.hs @@ -22,11 +22,11 @@ module Test ( -- Subsection headings are introduced with '-- **' and so on. -- ** Data types - T(..), T2, T3(..), T4(..), T5(..), + T(..), T2, T3(..), T4(..), T5(..), T6(..), N1(..), N2(..), N3(..), N4, N5(..), N6(..), N7(..), -- ** Records - R(..), + R(..), R1(..), -- | test that we can export record selectors on their own: p, q, u, @@ -72,8 +72,15 @@ module Test ( -- * Type signatures with argument docs k, l, m, n, o, + + -- * A section + -- and without an intervening comma: + -- ** A subsection + ) where +import Hidden +import Visible -- | This comment applies to the /following/ declaration -- and it continues until the next non-comment line @@ -96,6 +103,16 @@ data T5 a b = A3 a -- ^ documents 'A3' | B3 b -- ^ documents 'B3' +-- | Testing alternative comment styles +data T6 + -- | This is the doc for 'A4' + = A4 + | B4 + | -- ^ This is the doc for 'B4' + + -- | This is the doc for 'C4' + C4 + -- | A newtype newtype N1 a b = N1 (a b) @@ -164,6 +181,18 @@ data R = } -- ^ This is the 'C2' record constructor, also with some fields: +-- | Testing different record commenting styles +data R1 + -- | This is the 'C3' record constructor + = C3 { + -- | The 's1' record selector + s1 :: Int + -- | The 's2' record selector + , s2 :: Int + , s3 :: Int, + -- ^ The 's3' record selector + } + -- These section headers are only used when there is no export list to -- give the structure of the documentation: -- cgit v1.2.3