From 613f21e3e09e2f9c9b6c24490b192811b6392b21 Mon Sep 17 00:00:00 2001 From: simonmar Date: Mon, 3 Jun 2002 13:05:58 +0000 Subject: [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). --- src/HaddockRename.hs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'src/HaddockRename.hs') 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 -- cgit v1.2.3