Repository : ssh://[email protected]/haddock On branch : master Link : http://git.haskell.org/?p=haddock.git;a=commit;h=ac04da29b1a2bfb7139b7e9d0d2b88ea397a3bcc
>--------------------------------------------------------------- commit ac04da29b1a2bfb7139b7e9d0d2b88ea397a3bcc Author: Mateusz Kowalczyk <[email protected]> Date: Tue Aug 27 06:59:12 2013 +0100 Fix ticket #247. I do the same thing that the XHTML backend does: give these no special treatment and just act as if they are regular functions. >--------------------------------------------------------------- ac04da29b1a2bfb7139b7e9d0d2b88ea397a3bcc src/Haddock/Backends/LaTeX.hs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Haddock/Backends/LaTeX.hs b/src/Haddock/Backends/LaTeX.hs index b8635d0..4f94724 100644 --- a/src/Haddock/Backends/LaTeX.hs +++ b/src/Haddock/Backends/LaTeX.hs @@ -245,6 +245,8 @@ declNames :: LHsDecl DocName -> [DocName] declNames (L _ decl) = case decl of TyClD d -> [tcdName d] SigD (TypeSig lnames _) -> map unLoc lnames + ForD (ForeignImport (L _ n) _ _ _) -> [n] + ForD (ForeignExport (L _ n) _ _ _) -> [n] _ -> error "declaration not supported by declNames" @@ -299,8 +301,10 @@ ppTyFam _ _ _ _ _ = ppFor :: SrcSpan -> DocForDecl DocName -> ForeignDecl DocName -> Bool -> LaTeX -ppFor _ _ _ _ = - error "foreign declarations are currently not supported by --latex" +ppFor loc doc (ForeignImport (L _ name) (L _ typ) _ _) unicode = + ppFunSig loc doc [name] typ unicode +ppFor _ _ _ _ = error "ppFor error in Haddock.Backends.LaTeX" +-- error "foreign declarations are currently not supported by --latex" ------------------------------------------------------------------------------- _______________________________________________ ghc-commits mailing list [email protected] http://www.haskell.org/mailman/listinfo/ghc-commits
