From 85dab3d6aacf867a381c8810deaf585a43d42d43 Mon Sep 17 00:00:00 2001 From: Ɓukasz Hanuszczak Date: Thu, 23 Jul 2015 19:15:13 +0200 Subject: Integrate instance specification type into class instance definition. --- haddock-api/src/Haddock/Backends/LaTeX.hs | 2 +- haddock-api/src/Haddock/Backends/Xhtml/Decl.hs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'haddock-api/src/Haddock/Backends') diff --git a/haddock-api/src/Haddock/Backends/LaTeX.hs b/haddock-api/src/Haddock/Backends/LaTeX.hs index 59e5af3e..47087911 100644 --- a/haddock-api/src/Haddock/Backends/LaTeX.hs +++ b/haddock-api/src/Haddock/Backends/LaTeX.hs @@ -562,7 +562,7 @@ ppInstDecl unicode instHead = keyword "instance" <+> ppInstHead unicode instHead ppInstHead :: Bool -> InstHead DocName -> LaTeX ppInstHead unicode (InstHead {..}) = case ihdInstType of - ClassInst ctx -> ppContextNoLocs ctx unicode <+> typ + ClassInst ctx _ _ -> ppContextNoLocs ctx unicode <+> typ TypeInst rhs -> keyword "type" <+> typ <+> tibody rhs DataInst _ -> error "data instances not supported by --latex yet" where diff --git a/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs b/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs index 67405915..a894972e 100644 --- a/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs +++ b/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs @@ -531,13 +531,13 @@ ppInstHead :: LinksInfo -> Splice -> Unicode -> Qualification -> Html ppInstHead links splice unicode qual iid mspec ihead@(InstHead {..}) = case ihdInstType of - ClassInst cs | Just spec <- mspec -> + ClassInst cs _ _ | Just spec <- mspec -> subClsInstance (nameStr ++ "-" ++ show iid) hdr (mets spec ihead) where hdr = ppContextNoLocs cs unicode qual <+> typ mets = ppInstanceSigs links splice unicode qual nameStr = occNameString . nameOccName $ getName ihdClsName - ClassInst cs -> ppContextNoLocs cs unicode qual <+> typ + ClassInst cs _ _ -> ppContextNoLocs cs unicode qual <+> typ TypeInst rhs -> keyword "type" <+> typ <+> maybe noHtml (\t -> equals <+> ppType unicode qual t) rhs DataInst dd -> keyword "data" <+> typ -- cgit v1.2.3