aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Convert.hs
diff options
context:
space:
mode:
authorLuite Stegeman <stegeman@gmail.com>2014-08-22 20:11:16 +0200
committerLuite Stegeman <stegeman@gmail.com>2014-08-22 20:46:51 +0200
commit61c5729cb91ea66aa55bf0941717e526e7fde68d (patch)
tree6fc29330cc3f0da6ec5b7bb23ecb2c3e21434e29 /src/Haddock/Convert.hs
parenta18e080534a2778f37cb8ff9d501959fe6cc7acd (diff)
ghc 7.8.2 compatibility
Diffstat (limited to 'src/Haddock/Convert.hs')
-rw-r--r--src/Haddock/Convert.hs11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/Haddock/Convert.hs b/src/Haddock/Convert.hs
index 405bf204..73ff3f1a 100644
--- a/src/Haddock/Convert.hs
+++ b/src/Haddock/Convert.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE PatternGuards #-}
+{-# LANGUAGE CPP, PatternGuards #-}
-----------------------------------------------------------------------------
-- |
-- Module : Haddock.Convert
@@ -94,10 +94,19 @@ tyThingToLHsDecl t = noLoc $ case t of
(synifyType ImplicitizeForAll (dataConUserType dc)))
AConLike (PatSynCon ps) ->
+#if MIN_VERSION_ghc(7,8,3)
let (_, _, req_theta, prov_theta, _, res_ty) = patSynSig ps
+#else
+ let (_, _, (req_theta, prov_theta)) = patSynSig ps
+#endif
in SigD $ PatSynSig (synifyName ps)
+#if MIN_VERSION_ghc(7,8,3)
(fmap (synifyType WithinType) (patSynTyDetails ps))
(synifyType WithinType res_ty)
+#else
+ (fmap (synifyType WithinType) (patSynTyDetails ps))
+ (synifyType WithinType (patSynType ps))
+#endif
(synifyCtx req_theta)
(synifyCtx prov_theta)