aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2015-10-27 14:24:56 +0000
committerMatthew Pickering <matthewtpickering@gmail.com>2015-12-14 15:46:04 +0000
commit617392c5df94fae16261e1d298ce5c87575233c8 (patch)
tree1b7018b2ac64e00955ab2c40d5ed7e5c1eefb61f /haddock-api/src/Haddock
parent3fd2ed3213778c090ed5e27bd8a9e5bdee5c5135 (diff)
Track change to PatSyn.patSynSig
Diffstat (limited to 'haddock-api/src/Haddock')
-rw-r--r--haddock-api/src/Haddock/Convert.hs9
1 files changed, 8 insertions, 1 deletions
diff --git a/haddock-api/src/Haddock/Convert.hs b/haddock-api/src/Haddock/Convert.hs
index 7f807569..2458f027 100644
--- a/haddock-api/src/Haddock/Convert.hs
+++ b/haddock-api/src/Haddock/Convert.hs
@@ -100,7 +100,14 @@ tyThingToLHsDecl t = case t of
(synifySigWcType ImplicitizeForAll (dataConUserType dc)))
AConLike (PatSynCon ps) ->
- allOK . SigD $ PatSynSig (synifyName ps) (synifySigType WithinType (patSynType ps))
+ let (univ_tvs, req_theta, ex_tvs, prov_theta, arg_tys, res_ty) = patSynSig ps
+ qtvs = univ_tvs ++ ex_tvs
+ ty = mkFunTys arg_tys res_ty
+ in allOK . SigD $ PatSynSig (synifyName ps)
+ (Implicit, synifyTyVars qtvs)
+ (synifyCtx req_theta)
+ (synifyCtx prov_theta)
+ (synifyType WithinType ty)
where
withErrs e x = return (e, x)
allOK x = return (mempty, x)