aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock
diff options
context:
space:
mode:
Diffstat (limited to 'src/Haddock')
-rw-r--r--src/Haddock/Backends/LaTeX.hs2
-rw-r--r--src/Haddock/Backends/Xhtml/Decl.hs2
-rw-r--r--src/Haddock/Convert.hs7
-rw-r--r--src/Haddock/Interface/Rename.hs8
4 files changed, 10 insertions, 9 deletions
diff --git a/src/Haddock/Backends/LaTeX.hs b/src/Haddock/Backends/LaTeX.hs
index e0a530be..d05795f1 100644
--- a/src/Haddock/Backends/LaTeX.hs
+++ b/src/Haddock/Backends/LaTeX.hs
@@ -323,7 +323,7 @@ ppFor _ _ _ _ =
-- we skip type patterns for now
ppTySyn :: SrcSpan -> DocForDecl DocName -> TyClDecl DocName -> Bool -> LaTeX
-ppTySyn loc doc (TySynonym (L _ name) ltyvars _ ltype) unicode
+ppTySyn loc doc (TySynonym (L _ name) _ ltyvars _ ltype) unicode
= ppTypeOrFunSig loc [name] (unLoc ltype) doc (full, hdr, char '=') unicode
where
hdr = hsep (keyword "type" : ppDocBinder name : ppTyVars ltyvars)
diff --git a/src/Haddock/Backends/Xhtml/Decl.hs b/src/Haddock/Backends/Xhtml/Decl.hs
index 686e9a3e..c3e284b9 100644
--- a/src/Haddock/Backends/Xhtml/Decl.hs
+++ b/src/Haddock/Backends/Xhtml/Decl.hs
@@ -121,7 +121,7 @@ ppFor _ _ _ _ _ _ _ = error "ppFor"
-- we skip type patterns for now
ppTySyn :: Bool -> LinksInfo -> SrcSpan -> DocForDecl DocName -> TyClDecl DocName -> Bool
-> Qualification -> Html
-ppTySyn summary links loc doc (TySynonym (L _ name) ltyvars _ ltype) unicode qual
+ppTySyn summary links loc doc (TySynonym (L _ name) _ ltyvars _ ltype) unicode qual
= ppTypeOrFunSig summary links loc [name] (unLoc ltype) doc
(full, hdr, spaceHtml +++ equals) unicode qual
where
diff --git a/src/Haddock/Convert.hs b/src/Haddock/Convert.hs
index 82b57f0c..be5752d4 100644
--- a/src/Haddock/Convert.hs
+++ b/src/Haddock/Convert.hs
@@ -86,7 +86,7 @@ synifyAxiom (CoAxiom { co_ax_tvs = tvs, co_ax_lhs = lhs, co_ax_rhs = rhs })
tyvars = synifyTyVars tvs
typats = map (synifyType WithinType) args
hs_rhs_ty = synifyType WithinType rhs
- in TySynonym name tyvars (Just typats) hs_rhs_ty
+ in TySynonym name Nothing tyvars (Just typats) hs_rhs_ty
| otherwise
= error "synifyAxiom"
@@ -99,6 +99,7 @@ synifyTyCon tc
-- no built-in type has any stupidTheta:
(noLoc [])
(synifyName tc)
+ Nothing
-- tyConTyVars doesn't work on fun/prim, but we can make them up:
(zipWith
(\fakeTyVar realKind -> noLoc $
@@ -163,8 +164,8 @@ synifyTyCon tc
alg_deriv = Nothing
syn_type = synifyType WithinType (synTyConType tc)
in if isSynTyCon tc
- then TySynonym name tyvars typats syn_type
- else TyData alg_nd alg_ctx name tyvars typats (fmap synifyKind alg_kindSig) alg_cons alg_deriv
+ then TySynonym name Nothing tyvars typats syn_type
+ else TyData alg_nd alg_ctx name Nothing tyvars typats (fmap synifyKind alg_kindSig) alg_cons alg_deriv
-- User beware: it is your responsibility to pass True (use_gadt_syntax)
diff --git a/src/Haddock/Interface/Rename.hs b/src/Haddock/Interface/Rename.hs
index 9595e4cc..4c840807 100644
--- a/src/Haddock/Interface/Rename.hs
+++ b/src/Haddock/Interface/Rename.hs
@@ -320,7 +320,7 @@ renameTyClD d = case d of
-- return (TyFamily flav lname' ltyvars' kind' tckind)
return (TyFamily flav lname' ltyvars' tckind')
- TyData x lcontext lname ltyvars typats k cons _ -> do
+ TyData x lcontext lname cType ltyvars typats k cons _ -> do
lcontext' <- renameLContext lcontext
lname' <- renameL lname
ltyvars' <- mapM renameLTyVarBndr ltyvars
@@ -328,14 +328,14 @@ renameTyClD d = case d of
k' <- renameMaybeLKind k
cons' <- mapM renameLCon cons
-- I don't think we need the derivings, so we return Nothing
- return (TyData x lcontext' lname' ltyvars' typats' k' cons' Nothing)
+ return (TyData x lcontext' lname' cType ltyvars' typats' k' cons' Nothing)
- TySynonym lname ltyvars typats ltype -> do
+ TySynonym lname cType ltyvars typats ltype -> do
lname' <- renameL lname
ltyvars' <- mapM renameLTyVarBndr ltyvars
ltype' <- renameLType ltype
typats' <- mapM (mapM renameLType) typats
- return (TySynonym lname' ltyvars' typats' ltype')
+ return (TySynonym lname' cType ltyvars' typats' ltype')
ClassDecl lcontext lname ltyvars lfundeps lsigs _ ats at_defs _ -> do
lcontext' <- renameLContext lcontext