From 8f6dfe3413236f67665872e28acb8cec7cc7f364 Mon Sep 17 00:00:00 2001 From: simonmar Date: Mon, 15 Jul 2002 10:21:56 +0000 Subject: [haddock @ 2002-07-15 10:21:56 by simonmar] Mention alternative commenting styles. --- doc/haddock.sgml | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/haddock.sgml b/doc/haddock.sgml index d87aa4af..3d1a0304 100644 --- a/doc/haddock.sgml +++ b/doc/haddock.sgml @@ -587,10 +587,10 @@ class C a where data T a b - = -- | This is the documentation for the 'C1' constructor - C1 a b - | -- | This is the documentation for the 'C2' constructor - C2 a b + -- | This is the documentation for the 'C1' constructor + = C1 a b + -- | This is the documentation for the 'C2' constructor + | C2 a b or like this: @@ -614,10 +614,14 @@ data R a b = data R a b = C { a :: a -- ^ This is the documentation for the 'a' field - -- (NOTE: *before* the following comma) , b :: b -- ^ This is the documentation for the 'b' field } + + Alternative layout styles are generally accepted by + Haddock - for example doc comments can appear before or after + the comma in separated lists such as the list of record fields + above.
@@ -703,6 +707,24 @@ module Foo ( table of contents at the top of the module documentation for you. + The alternative style of placing the commas at the + beginning of each line is also supported. eg.: + + +module Foo ( + -- * Classes + , C(..) + -- * Types + -- ** A data type + , T + -- ** A record + , R + -- * Some functions + , f + , g + ) where + +
Re-exporting an entire module -- cgit v1.2.3