aboutsummaryrefslogtreecommitdiff
path: root/src/HaddockRename.hs
diff options
context:
space:
mode:
authorsimonmar <unknown>2002-06-03 13:05:58 +0000
committersimonmar <unknown>2002-06-03 13:05:58 +0000
commit613f21e3e09e2f9c9b6c24490b192811b6392b21 (patch)
tree1ec348eb29f908159081b0f32381276be94e970d /src/HaddockRename.hs
parentf93641d6fe818667bde3215364b9cb2de9a4dc41 (diff)
[haddock @ 2002-06-03 13:05:57 by simonmar]
Allow exporting of individual class methods and record selectors. For these we have to invent the correct type signature, which we do in the simplest possible way (i.e. no context reduction nonsense in the class case).
Diffstat (limited to 'src/HaddockRename.hs')
-rw-r--r--src/HaddockRename.hs12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/HaddockRename.hs b/src/HaddockRename.hs
index 71407cb9..c773131e 100644
--- a/src/HaddockRename.hs
+++ b/src/HaddockRename.hs
@@ -92,11 +92,11 @@ renameDecl decl
con <- renameConDecl con
doc <- renameMaybeDoc doc
return (HsNewTypeDecl loc ctx t args con drv doc)
- HsClassDecl loc qt fds decls doc -> do
- qt <- renameClassHead qt
+ HsClassDecl loc ctxt nm tvs fds decls doc -> do
+ ctxt <- mapM renamePred ctxt
decls <- mapM renameDecl decls
doc <- renameMaybeDoc doc
- return (HsClassDecl loc qt fds decls doc)
+ return (HsClassDecl loc ctxt nm tvs fds decls doc)
HsTypeSig loc fs qt doc -> do
qt <- renameType qt
doc <- renameMaybeDoc doc
@@ -115,12 +115,6 @@ renameDecl decl
_ ->
return decl
-renameClassHead (HsForAllType tvs ctx ty) = do
- ctx <- mapM renamePred ctx
- return (HsForAllType tvs ctx ty)
-renameClassHead ty = do
- return ty
-
renameConDecl (HsConDecl loc nm tvs ctxt tys doc) = do
tys <- mapM renameBangTy tys
doc <- renameMaybeDoc doc