[package-plan] 01/02: fix hothasktags by adding a patch to build with recent src-exts

Sean Whitton spwhitton at spwhitton.name
Fri Jul 7 22:18:33 UTC 2017


This is an automated email from the git hooks/post-receive script.

spwhitton pushed a commit to branch master
in repository package-plan.

commit f75c0c8e2501c525f80816fd898088f470f87b82
Author: Sean Whitton <spwhitton at spwhitton.name>
Date:   Fri Jul 7 23:17:20 2017 +0100

    fix hothasktags by adding a patch to build with recent src-exts
---
 packages.txt                                       |  2 +-
 .../0001-update-to-haskell-src-exts-1.19.1.patch   | 70 ++++++++++++++++++++++
 patches/hothasktags/0.3.8/series                   |  1 +
 3 files changed, 72 insertions(+), 1 deletion(-)

diff --git a/packages.txt b/packages.txt
index ae4625a..3220203 100644
--- a/packages.txt
+++ b/packages.txt
@@ -368,7 +368,7 @@ hOpenPGP 2.5.5 key
 hopenpgp-tools 0.19.4 binary
 hosc 0.15
 hostname 1.0
-hothasktags 0.3.8 binary key ignore # BROKEN - LTS 8 - needs patching for newer src-exts
+hothasktags 0.3.8 binary key
 hourglass 0.2.10
 hpack 0.17.1
 hs-bibutils 5.5
diff --git a/patches/hothasktags/0.3.8/0001-update-to-haskell-src-exts-1.19.1.patch b/patches/hothasktags/0.3.8/0001-update-to-haskell-src-exts-1.19.1.patch
new file mode 100644
index 0000000..4068258
--- /dev/null
+++ b/patches/hothasktags/0.3.8/0001-update-to-haskell-src-exts-1.19.1.patch
@@ -0,0 +1,70 @@
+From: Joey Hess <joeyh at joeyh.name>
+Date: Fri, 7 Jul 2017 09:31:29 -0400
+Subject: update to haskell-src-exts 1.18.2 / 1.19.1
+
+Language.Haskell.Exts.Annotated has gone away, so used
+Language.Haskell.Exts.
+
+EThingAll constructor is no more, so removed that.
+
+Otherwise, just a matter of adjusting pattern matching where new fields
+have been added.
+
+Tested by running hothasktags in git-annex's source tree; the patched
+version generates an identical tags file to the old version.
+---
+ Main.hs           | 10 ++++------
+ hothasktags.cabal |  2 +-
+ 2 files changed, 5 insertions(+), 7 deletions(-)
+
+--- a/Main.hs
++++ b/Main.hs
+@@ -4,7 +4,7 @@
+ module Main where
+ 
+ import Options.Applicative
+-import qualified Language.Haskell.Exts.Annotated as L
++import qualified Language.Haskell.Exts as L
+ import System.IO
+ import GHC.IO.Handle (HandlePosition)
+ import qualified Data.Map.Strict as Map
+@@ -30,7 +30,7 @@ localDecls :: L.Module L.SrcSpanInfo -> Map.Map String Defn
+ localDecls (L.Module _ _ _ _ decls) = Map.fromList $ concatMap extract decls
+     where
+     extract (L.TypeDecl _ hd _) = extractDeclHead hd
+-    extract (L.TypeFamDecl _ hd _) = extractDeclHead hd
++    extract (L.TypeFamDecl _ hd _ _) = extractDeclHead hd
+     extract (L.DataDecl _ _ _ hd decls' _) =
+       extractDeclHead hd ++ concatMap extractQualConDecl decls'
+     extract (L.GDataDecl _ _ _ hd _ decls' _) =
+@@ -73,7 +73,7 @@ localDecls (L.Module _ _ _ _ decls) = Map.fromList $ concatMap extract decls
+ 
+     extractClassDecl (L.ClsDecl _ decl) = extract decl
+     extractClassDecl (L.ClsDataFam _ _ hd _) = extractDeclHead hd
+-    extractClassDecl (L.ClsTyFam _ hd _) = extractDeclHead hd
++    extractClassDecl (L.ClsTyFam _ hd _ _) = extractDeclHead hd
+     extractClassDecl _ = []
+ 
+     extractName (L.Ident loc name) = [(name, getLoc loc)]
+@@ -134,9 +134,7 @@ exported mod'@(L.Module _
+   where
+     matchesSpec nm (L.EVar _ (L.UnQual _ (L.Ident _ name'))) = nm == name'
+     matchesSpec nm (L.EAbs _ _ (L.UnQual _ (L.Ident _ name'))) = nm == name'
+-    matchesSpec nm (L.EThingAll _ (L.UnQual _ (L.Ident _ name'))) =
+-      nm == name' || (nm `elem` thingMembers mod' name')
+-    matchesSpec nm (L.EThingWith _ (L.UnQual _ (L.Ident _ name')) cnames) =
++    matchesSpec nm (L.EThingWith _ _ (L.UnQual _ (L.Ident _ name')) cnames) =
+       nm == name' || any (matchesCName nm) cnames
+     -- XXX this is wrong, moduleScope handles it though
+     matchesSpec _ (L.EModuleContents _ (L.ModuleName _ _)) = False
+--- a/hothasktags.cabal
++++ b/hothasktags.cabal
+@@ -38,7 +38,7 @@ executable hothasktags
+         filepath,
+         filemanip,
+         Glob,
+-        haskell-src-exts >= 1.17 && < 1.18,
++        haskell-src-exts >= 1.18.2 && < 1.20,
+         cpphs >= 1.11 && < 1.21,
+         optparse-applicative >= 0.13,
+         split
diff --git a/patches/hothasktags/0.3.8/series b/patches/hothasktags/0.3.8/series
new file mode 100644
index 0000000..cf71f0e
--- /dev/null
+++ b/patches/hothasktags/0.3.8/series
@@ -0,0 +1 @@
+0001-update-to-haskell-src-exts-1.19.1.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-haskell/package-plan.git



More information about the Pkg-haskell-commits mailing list