aboutsummaryrefslogtreecommitdiff
path: root/src/HaddockDB.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/HaddockDB.hs')
-rw-r--r--src/HaddockDB.hs15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/HaddockDB.hs b/src/HaddockDB.hs
index a2a4a8e7..ebd0ccb2 100644
--- a/src/HaddockDB.hs
+++ b/src/HaddockDB.hs
@@ -6,7 +6,7 @@
module HaddockDB (ppDocBook) where
-import HaddockTypes hiding (Doc)
+import HaddockTypes
import HaddockUtil
import HsSyn
@@ -16,6 +16,8 @@ import FiniteMap
-----------------------------------------------------------------------------
-- Printing the results in DocBook format
+ppDocBook = error "not working"
+{-
ppDocBook :: FilePath -> [(Module, Interface)] -> String
ppDocBook odir mods = render (ppIfaces mods)
@@ -55,22 +57,22 @@ ppIfaces mods
$$ text "</varlistentry>"
do_export _ _ = empty
- do_decl (HsTypeSig _ [nm] ty)
+ do_decl (HsTypeSig _ [nm] ty _)
= ppHsName nm <> text " :: " <> ppHsType ty
- do_decl (HsTypeDecl _ nm args ty)
+ do_decl (HsTypeDecl _ nm args ty _)
= hsep ([text "type", ppHsName nm ]
++ map ppHsName args
++ [equals, ppHsType ty])
- do_decl (HsNewTypeDecl loc ctx nm args con drv)
+ do_decl (HsNewTypeDecl loc ctx nm args con drv _)
= hsep ([text "data", ppHsName nm] -- data, not newtype
++ map ppHsName args
) <+> equals <+> ppHsConstr con -- ToDo: derivings
- do_decl (HsDataDecl loc ctx nm args cons drv)
+ do_decl (HsDataDecl loc ctx nm args cons drv _)
= hsep ([text "data", {-ToDo: context-}ppHsName nm]
++ map ppHsName args)
<+> vcat (zipWith (<+>) (equals : repeat (char '|'))
(map ppHsConstr cons))
- do_decl (HsClassDecl loc ty fds decl)
+ do_decl (HsClassDecl loc ty fds decl _)
= hsep [text "class", ppHsType ty]
do_decl decl
= empty
@@ -158,3 +160,4 @@ ubxParenList :: [Doc] -> Doc
ubxParenList = ubxparens . fsep . punctuate comma
ubxparens p = text "(#" <> p <> text "#)"
+-}