diff options
| author | Mateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk> | 2014-03-31 05:34:36 +0100 | 
|---|---|---|
| committer | Mateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk> | 2014-03-31 05:34:36 +0100 | 
| commit | bd134c7b2a6880bf3858fd8c27fa16ab946d7718 (patch) | |
| tree | 811926786f30e17ed0370ad80d9f444009ea7213 /src/Haddock/Backends | |
| parent | f3c7cd34d066cd40cb4983893165de038974fd95 (diff) | |
Print kind signatures on GADTs
Diffstat (limited to 'src/Haddock/Backends')
| -rw-r--r-- | src/Haddock/Backends/Xhtml/Decl.hs | 16 | 
1 files changed, 10 insertions, 6 deletions
| diff --git a/src/Haddock/Backends/Xhtml/Decl.hs b/src/Haddock/Backends/Xhtml/Decl.hs index 2dc1e0e7..8884f69f 100644 --- a/src/Haddock/Backends/Xhtml/Decl.hs +++ b/src/Haddock/Backends/Xhtml/Decl.hs @@ -39,7 +39,6 @@ import GHC.Exts  import Name  import BooleanFormula -  ppDecl :: Bool -> LinksInfo -> LHsDecl DocName         -> DocForDecl DocName -> [DocInstance DocName] -> [(DocName, Fixity)]         -> [(DocName, DocForDecl DocName)] -> Splice -> Unicode -> Qualification -> Html @@ -312,7 +311,6 @@ ppDataBinderWithVars :: Bool -> TyClDecl DocName -> Html  ppDataBinderWithVars summ decl =    ppAppDocNameNames summ (tcdName decl) (tyvarNames $ tcdTyVars decl) -  --------------------------------------------------------------------------------  -- * Type applications  -------------------------------------------------------------------------------- @@ -726,17 +724,23 @@ ppShortField summary unicode qual (ConDeclField (L _ name) ltype _)  -- | Print the LHS of a data\/newtype declaration.  -- Currently doesn't handle 'data instance' decls or kind signatures  ppDataHeader :: Bool -> TyClDecl DocName -> Unicode -> Qualification -> Html -ppDataHeader summary decl@(DataDecl { tcdDataDefn = HsDataDefn { dd_ND = nd -                                                               , dd_ctxt = ctxt } }) +ppDataHeader summary decl@(DataDecl { tcdDataDefn = +                                         HsDataDefn { dd_ND = nd +                                                    , dd_ctxt = ctxt +                                                    , dd_kindSig = ks } })               unicode qual    = -- newtype or data -    (case nd of { NewType -> keyword "newtype"; DataType -> keyword "data" }) <+> +    (case nd of { NewType -> keyword "newtype"; DataType -> keyword "data" }) +    <+>      -- context      ppLContext ctxt unicode qual <+>      -- T a b c ..., or a :+: b      ppDataBinderWithVars summary decl -ppDataHeader _ _ _ _ = error "ppDataHeader: illegal argument" +    <+> case ks of +      Nothing -> mempty +      Just (L _ x) -> dcolon unicode <+> ppKind unicode qual x +ppDataHeader _ _ _ _ = error "ppDataHeader: illegal argument"  --------------------------------------------------------------------------------  -- * Types and contexts | 
