[commit: haddock] 2.15, 2.15.0.1, 2.15.0.2, T6018-injective-type-families, adamse-D1033, clean, ghc-head, master, metainfo, v2.15, wip/10268, wip/10313, wip/D538, wip/D538-1, wip/D538-2, wip/D538-3, wip/D538-4, wip/D538-5, wip/D538-6, wip/D548-master, wip/D548-master-2, wip/T10483, wip/T9840, wip/api-annot-tweaks-7.10, wip/api-annots-ghc-7.10-3, wip/orf-reboot: ghc 7.8.2 compatibility (61c5729)

git at git.haskell.org git at git.haskell.org
Wed Jul 8 08:30:34 UTC 2015


Repository : ssh://git@git.haskell.org/haddock

On branches: 2.15,2.15.0.1,2.15.0.2,T6018-injective-type-families,adamse-D1033,clean,ghc-head,master,metainfo,v2.15,wip/10268,wip/10313,wip/D538,wip/D538-1,wip/D538-2,wip/D538-3,wip/D538-4,wip/D538-5,wip/D538-6,wip/D548-master,wip/D548-master-2,wip/T10483,wip/T9840,wip/api-annot-tweaks-7.10,wip/api-annots-ghc-7.10-3,wip/orf-reboot
Link       : http://git.haskell.org/haddock.git/commitdiff/61c5729cb91ea66aa55bf0941717e526e7fde68d

>---------------------------------------------------------------

commit 61c5729cb91ea66aa55bf0941717e526e7fde68d
Author: Luite Stegeman <stegeman at gmail.com>
Date:   Fri Aug 22 20:11:16 2014 +0200

    ghc 7.8.2 compatibility


>---------------------------------------------------------------

61c5729cb91ea66aa55bf0941717e526e7fde68d
 .travis.yml                     |  1 +
 haddock-api/haddock-api.cabal   |  2 +-
 src/Haddock/Convert.hs          | 11 ++++++++++-
 src/Haddock/Interface/Create.hs | 10 +++++++++-
 4 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 9872092..1b2fb90 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,6 +1,7 @@
 language: haskell
 
 env:
+ - GHCVER=7.8.2
  - GHCVER=7.8.3
 
 before_install:
diff --git a/haddock-api/haddock-api.cabal b/haddock-api/haddock-api.cabal
index 71bf11f..171412d 100644
--- a/haddock-api/haddock-api.cabal
+++ b/haddock-api/haddock-api.cabal
@@ -45,7 +45,7 @@ library
     , array
     , xhtml >= 3000.2 && < 3000.3
     , Cabal >= 1.10
-    , ghc == 7.8.3
+    , ghc >= 7.8.2 && < 7.8.4
 
     , ghc-paths
     , haddock-library == 1.1.0.*
diff --git a/src/Haddock/Convert.hs b/src/Haddock/Convert.hs
index 405bf20..73ff3f1 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)
 
diff --git a/src/Haddock/Interface/Create.hs b/src/Haddock/Interface/Create.hs
index cf7ed84..b66773a 100644
--- a/src/Haddock/Interface/Create.hs
+++ b/src/Haddock/Interface/Create.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE TupleSections, BangPatterns, LambdaCase #-}
+{-# LANGUAGE CPP, TupleSections, BangPatterns, LambdaCase #-}
 {-# OPTIONS_GHC -Wwarn #-}
 -----------------------------------------------------------------------------
 -- |
@@ -366,7 +366,11 @@ classDecls class_ = filterDecls . collectDocs . sortByLoc $ decls
   where
     decls = docs ++ defs ++ sigs ++ ats
     docs  = mkDecls tcdDocs DocD class_
+#if MIN_VERSION_ghc(7,8,3)
     defs  = mkDecls (bagToList . tcdMeths) ValD class_
+#else
+    defs  = mkDecls (map snd . bagToList . tcdMeths) ValD class_
+#endif
     sigs  = mkDecls tcdSigs SigD class_
     ats   = mkDecls tcdATs (TyClD . FamDecl) class_
 
@@ -392,7 +396,11 @@ ungroup group_ =
   mkDecls hs_docs                DocD   group_ ++
   mkDecls hs_instds              InstD  group_ ++
   mkDecls (typesigs . hs_valds)  SigD   group_ ++
+#if MIN_VERSION_ghc(7,8,3)
   mkDecls (valbinds . hs_valds)  ValD   group_
+#else
+  mkDecls (map snd . valbinds . hs_valds)  ValD   group_
+#endif
   where
     typesigs (ValBindsOut _ sigs) = filter isVanillaLSig sigs
     typesigs _ = error "expected ValBindsOut"



More information about the ghc-commits mailing list