aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Haddock/Backends/HH2.hs8
-rw-r--r--src/Haddock/Backends/HaddockDB.hs1
-rw-r--r--src/Haddock/Backends/Html.hs3
-rw-r--r--src/Haddock/Interface.hs6
-rw-r--r--src/Haddock/Utils/FastMutInt2.hs4
5 files changed, 16 insertions, 6 deletions
diff --git a/src/Haddock/Backends/HH2.hs b/src/Haddock/Backends/HH2.hs
index e9cf203c..f89e6ad6 100644
--- a/src/Haddock/Backends/HH2.hs
+++ b/src/Haddock/Backends/HH2.hs
@@ -11,16 +11,18 @@
module Haddock.Backends.HH2 (ppHH2Contents, ppHH2Index, ppHH2Files, ppHH2Collection) where
+import Haddock.Types
-ppHH2Contents, ppHH2Index, ppHH2Files, ppHH2Collection :: a
+ppHH2Files :: FilePath -> Maybe String -> [Interface] -> [FilePath] -> IO ()
+ppHH2Files = error "not yet"
+
+ppHH2Contents, ppHH2Index, ppHH2Collection :: a
ppHH2Contents = error "not yet"
ppHH2Index = error "not yet"
-ppHH2Files = error "not yet"
ppHH2Collection = error "not yet"
{-
import HaddockModuleTree
-import HaddockTypes
import HaddockUtil
import HsSyn2 hiding(Doc)
import qualified Map
diff --git a/src/Haddock/Backends/HaddockDB.hs b/src/Haddock/Backends/HaddockDB.hs
index 1ff09975..ee9722ad 100644
--- a/src/Haddock/Backends/HaddockDB.hs
+++ b/src/Haddock/Backends/HaddockDB.hs
@@ -22,6 +22,7 @@ import Text.PrettyPrint
-----------------------------------------------------------------------------
-- Printing the results in DocBook format
+ppDocBook :: a
ppDocBook = error "not working"
{-
ppDocBook :: FilePath -> [(Module, Interface)] -> String
diff --git a/src/Haddock/Backends/Html.hs b/src/Haddock/Backends/Html.hs
index 4da9e6e0..3c25a429 100644
--- a/src/Haddock/Backends/Html.hs
+++ b/src/Haddock/Backends/Html.hs
@@ -379,6 +379,7 @@ mkNode ss (Node s leaf pkg short ts) depth id_ = htmlNode
mod_width = 50::Int {-em-}
+ td_pad_w :: Double -> Int -> Html -> HtmlTable
td_pad_w pad depth_ =
tda [thestyle ("padding-left: " ++ show pad ++ "em;" ++
"width: " ++ show (mod_width - depth_*2) ++ "em")]
@@ -543,6 +544,7 @@ ppHtmlIndex odir doctitle maybe_package maybe_html_help_format
tda [ theclass "indexentry" ] << toHtml str </>
aboves (map doAnnotatedEntity (zip [1..] many_entities))
+ doAnnotatedEntity :: (Integer, (Name, [(Module, Bool)])) -> HtmlTable
doAnnotatedEntity (j,(nm,entries))
= tda [ theclass "indexannot" ] <<
toHtml (show j) <+> parens (ppAnnot (nameOccName nm)) <->
@@ -1540,6 +1542,7 @@ ppr_mono_ty _ (HsPArrTy ty) u = pabrackets (ppr_mono_lty pREC_TOP
ppr_mono_ty _ (HsPredTy p) u = parens (ppPred u p)
ppr_mono_ty _ (HsNumTy n) _ = toHtml (show n) -- generics only
ppr_mono_ty _ (HsSpliceTy _) _ = error "ppr_mono_ty-haddock"
+ppr_mono_ty _ (HsRecTy _) _ = error "ppr_mono_ty HsRecTy"
ppr_mono_ty ctxt_prec (HsAppTy fun_ty arg_ty) unicode
= maybeParen ctxt_prec pREC_CON $
diff --git a/src/Haddock/Interface.hs b/src/Haddock/Interface.hs
index d0106347..ffb9ebaf 100644
--- a/src/Haddock/Interface.hs
+++ b/src/Haddock/Interface.hs
@@ -102,7 +102,7 @@ createInterfaces' verbosity modules flags instIfaceMap = do
modgraph' <- if needsTemplateHaskell modgraph
then do
dflags <- getSessionDynFlags
- setSessionDynFlags dflags { hscTarget = HscC }
+ _ <- setSessionDynFlags dflags { hscTarget = HscC }
-- we need to set HscC on all the ModSummaries as well
let addHscC m = m { ms_hspp_opts = (ms_hspp_opts m) { hscTarget = HscC } }
return (map addHscC modgraph)
@@ -186,8 +186,8 @@ processModule verbosity modsum flags modMap instIfaceMap = do
out verbosity verbose "Creating interface..."
let (interface, msg) = runWriter $ createInterface ghcMod flags modMap instIfaceMap
liftIO $ mapM_ putStrLn msg
- liftIO $ evaluate interface
- return (Just interface)
+ interface' <- liftIO $ evaluate interface
+ return (Just interface')
else
return Nothing
#else
diff --git a/src/Haddock/Utils/FastMutInt2.hs b/src/Haddock/Utils/FastMutInt2.hs
index 14273ac6..4ac50e60 100644
--- a/src/Haddock/Utils/FastMutInt2.hs
+++ b/src/Haddock/Utils/FastMutInt2.hs
@@ -22,7 +22,11 @@ import GlaExts
import PrelIOBase
#else
import GHC.Base
+#if __GLASGOW_HASKELL__ < 611
import GHC.IOBase
+#else
+import GHC.IO
+#endif
#endif
#if __GLASGOW_HASKELL__ < 411