aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/Interface
diff options
context:
space:
mode:
authorDr. ERDI Gergo <gergo@erdi.hu>2014-11-20 22:35:38 +0800
committerMateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>2014-12-12 07:07:30 +0000
commita197615a032f14f20761a7dec21ea098297eda31 (patch)
tree2fec80f94924cd0d8dd44110a054ceb93a3217f6 /haddock-api/src/Haddock/Interface
parentd5950c8a95dc46fe2702d04f724145c73355043e (diff)
Update Haddock to new pattern synonym type signature syntax
Conflicts: haddock-api/src/Haddock/Backends/Xhtml/Decl.hs haddock-api/src/Haddock/Convert.hs
Diffstat (limited to 'haddock-api/src/Haddock/Interface')
-rw-r--r--haddock-api/src/Haddock/Interface/Create.hs4
-rw-r--r--haddock-api/src/Haddock/Interface/Rename.hs10
2 files changed, 6 insertions, 8 deletions
diff --git a/haddock-api/src/Haddock/Interface/Create.hs b/haddock-api/src/Haddock/Interface/Create.hs
index 11b8494d..da17ccc7 100644
--- a/haddock-api/src/Haddock/Interface/Create.hs
+++ b/haddock-api/src/Haddock/Interface/Create.hs
@@ -343,8 +343,8 @@ typeDocs d =
let docs = go 0 in
case d of
SigD (TypeSig _ ty) -> docs (unLoc ty)
- SigD (PatSynSig _ arg_tys ty req prov) ->
- let allTys = ty : concat [ F.toList arg_tys, unLoc req, unLoc prov ]
+ SigD (PatSynSig _ _ req prov ty) ->
+ let allTys = ty : concat [ unLoc req, unLoc prov ]
in F.foldMap (docs . unLoc) allTys
ForD (ForeignImport _ ty _ _) -> docs (unLoc ty)
TyClD (SynDecl { tcdRhs = ty }) -> docs (unLoc ty)
diff --git a/haddock-api/src/Haddock/Interface/Rename.hs b/haddock-api/src/Haddock/Interface/Rename.hs
index e9048b53..a5717a58 100644
--- a/haddock-api/src/Haddock/Interface/Rename.hs
+++ b/haddock-api/src/Haddock/Interface/Rename.hs
@@ -401,15 +401,13 @@ renameSig sig = case sig of
lnames' <- mapM renameL lnames
ltype' <- renameLType ltype
return (TypeSig lnames' ltype')
- PatSynSig lname args ltype lreq lprov -> do
+ PatSynSig lname (flag, qtvs) lreq lprov lty -> do
lname' <- renameL lname
- args' <- case args of
- PrefixPatSyn largs -> PrefixPatSyn <$> mapM renameLType largs
- InfixPatSyn lleft lright -> InfixPatSyn <$> renameLType lleft <*> renameLType lright
- ltype' <- renameLType ltype
+ qtvs' <- renameLTyVarBndrs qtvs
lreq' <- renameLContext lreq
lprov' <- renameLContext lprov
- return $ PatSynSig lname' args' ltype' lreq' lprov'
+ lty' <- renameLType lty
+ return $ PatSynSig lname' (flag, qtvs') lreq' lprov' lty'
FixSig (FixitySig lname fixity) -> do
lname' <- renameL lname
return $ FixSig (FixitySig lname' fixity)