From ba0072ff1f1319421aa38b216903ea89d589bf20 Mon Sep 17 00:00:00 2001
From: David Waern <david.waern@gmail.com>
Date: Tue, 20 Jan 2009 19:27:39 +0000
Subject: Document H.I.Create.collectDocs better

---
 src/Haddock/Interface/Create.hs | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

(limited to 'src/Haddock')

diff --git a/src/Haddock/Interface/Create.hs b/src/Haddock/Interface/Create.hs
index a4738b54..3dee5d6a 100644
--- a/src/Haddock/Interface/Create.hs
+++ b/src/Haddock/Interface/Create.hs
@@ -282,7 +282,10 @@ filterClasses decls = [ if isClassD d then (L loc (filterClass d), doc) else x
 --------------------------------------------------------------------------------
 
 
--- | Collect the docs and attach them to the right declaration
+-- | Collect the docs and attach them to the right declaration.
+-- Ideally, input should contain all kinds of declarations, so that we don't
+-- attach docs to the wrong declaration. An exception to this is function and
+-- value declarations - we assume (for now) that they are not part of the input.
 collectDocs :: [Decl] -> [(Decl, (Maybe Doc))]
 collectDocs decls = collect Nothing DocEmpty decls
 
-- 
cgit v1.2.3