aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Convert.hs
diff options
context:
space:
mode:
authorDr. ERDI Gergo <gergo@erdi.hu>2014-11-20 22:35:38 +0800
committerDr. ERDI Gergo <gergo@erdi.hu>2014-11-20 22:35:38 +0800
commitbf80e2f594777c0c32fae092454bff0c13ae6181 (patch)
tree17b1299b2c43f1cb7b08e09ec817c9cfc51f082b /src/Haddock/Convert.hs
parent9cdf19bad54a6cc4b322396fdd06f4c1ee045b22 (diff)
Update Haddock to new pattern synonym type signature syntax
Diffstat (limited to 'src/Haddock/Convert.hs')
-rw-r--r--src/Haddock/Convert.hs10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/Haddock/Convert.hs b/src/Haddock/Convert.hs
index 48306392..08892cd3 100644
--- a/src/Haddock/Convert.hs
+++ b/src/Haddock/Convert.hs
@@ -20,7 +20,7 @@ module Haddock.Convert where
import HsSyn
import TcType ( tcSplitSigmaTy )
import TypeRep
-import Type(isStrLitTy)
+import Type ( isStrLitTy, mkFunTys )
import Kind ( splitKindFunTys, synTyConResKind, isKind )
import Name
import Var
@@ -94,12 +94,14 @@ tyThingToLHsDecl t = noLoc $ case t of
(synifyType ImplicitizeForAll (dataConUserType dc)))
AConLike (PatSynCon ps) ->
- let (_, _, req_theta, prov_theta, _, res_ty) = patSynSig ps
+ let (univ_tvs, ex_tvs, req_theta, prov_theta, arg_tys, res_ty) = patSynSig ps
+ qtvs = univ_tvs ++ ex_tvs
+ ty = mkFunTys arg_tys res_ty
in SigD $ PatSynSig (synifyName ps)
- (fmap (synifyType WithinType) (patSynTyDetails ps))
- (synifyType WithinType res_ty)
+ (Implicit, synifyTyVars qtvs)
(synifyCtx req_theta)
(synifyCtx prov_theta)
+ (synifyType WithinType ty)
synifyAxBranch :: TyCon -> CoAxBranch -> TyFamInstEqn Name
synifyAxBranch tc (CoAxBranch { cab_tvs = tkvs, cab_lhs = args, cab_rhs = rhs })