aboutsummaryrefslogtreecommitdiff
path: root/examples/Test.hs
diff options
context:
space:
mode:
authorsimonmar <unknown>2002-07-23 08:43:02 +0000
committersimonmar <unknown>2002-07-23 08:43:02 +0000
commit78a941372e7720b74a18ac259bf227512486dda1 (patch)
treea4d9883e6fa90e3641b0c82d616494b31621a39c /examples/Test.hs
parente5d775864dfa52d588aee8f0ce41ef66181e9e05 (diff)
[haddock @ 2002-07-23 08:43:02 by simonmar]
more tests
Diffstat (limited to 'examples/Test.hs')
-rw-r--r--examples/Test.hs33
1 files changed, 31 insertions, 2 deletions
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: