diff options
author | simonmar <unknown> | 2002-07-23 08:43:02 +0000 |
---|---|---|
committer | simonmar <unknown> | 2002-07-23 08:43:02 +0000 |
commit | 78a941372e7720b74a18ac259bf227512486dda1 (patch) | |
tree | a4d9883e6fa90e3641b0c82d616494b31621a39c /examples | |
parent | e5d775864dfa52d588aee8f0ce41ef66181e9e05 (diff) |
[haddock @ 2002-07-23 08:43:02 by simonmar]
more tests
Diffstat (limited to 'examples')
-rw-r--r-- | examples/Makefile | 2 | ||||
-rw-r--r-- | examples/NoLayout.hs | 4 | ||||
-rw-r--r-- | examples/Test.hs | 33 |
3 files changed, 36 insertions, 3 deletions
diff --git a/examples/Makefile b/examples/Makefile index 839f04c1..7fd20f45 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -3,7 +3,7 @@ include $(TOP)/mk/boilerplate.mk all :: index.html -index.html : $(HS_SRCS) +index.html : $(HS_SRCS) $(HADDOCK_INPLACE) $(HADDOCK_INPLACE) -h $(HS_SRCS) include $(TOP)/mk/target.mk diff --git a/examples/NoLayout.hs b/examples/NoLayout.hs new file mode 100644 index 00000000..0be97ba1 --- /dev/null +++ b/examples/NoLayout.hs @@ -0,0 +1,4 @@ +module NoLayout where { + -- | the class 'C' + g :: Int; + } 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: |