[Pkg-haskell-commits] darcs: tools: Unbreak hothasktags
Joachim Breitner
mail at joachim-breitner.de
Fri Mar 7 18:35:23 UTC 2014
Fri Mar 7 18:34:08 UTC 2014 Joachim Breitner <mail at joachim-breitner.de>
* Unbreak hothasktags
M ./all-packages/packages.txt -1 +1
A ./all-packages/patches/hothasktags/0.3.1/
A ./all-packages/patches/hothasktags/0.3.1/00-bump-haskell-src-exts-version
A ./all-packages/patches/hothasktags/0.3.1/series
Fri Mar 7 18:34:08 UTC 2014 Joachim Breitner <mail at joachim-breitner.de>
* Unbreak hothasktags
diff -rN -u old-tools/all-packages/packages.txt new-tools/all-packages/packages.txt
--- old-tools/all-packages/packages.txt 2014-03-07 18:35:22.921324670 +0000
+++ new-tools/all-packages/packages.txt 2014-03-07 18:35:22.921324670 +0000
@@ -290,7 +290,7 @@
hOpenPGP 1.2
hopenpgp-tools 0.7 binary
hostname 1.0
-hothasktags 0.3.1 binary broken, #730888
+hothasktags 0.3.1 binary
hS3 0.5.7
hs-bibutils 4.12
hscolour 1.20.3
diff -rN -u old-tools/all-packages/patches/hothasktags/0.3.1/00-bump-haskell-src-exts-version new-tools/all-packages/patches/hothasktags/0.3.1/00-bump-haskell-src-exts-version
--- old-tools/all-packages/patches/hothasktags/0.3.1/00-bump-haskell-src-exts-version 1970-01-01 00:00:00.000000000 +0000
+++ new-tools/all-packages/patches/hothasktags/0.3.1/00-bump-haskell-src-exts-version 2014-03-07 18:35:22.957324665 +0000
@@ -0,0 +1,50 @@
+Description: Fix compatibility with haskell-src-exts 1.14
+Author: Raúl Benencia <rul at kalgan.cc>
+--- a/Main.hs
++++ b/Main.hs
+@@ -39,7 +39,7 @@
+
+ extractPat (L.PVar _ name) = extractName name
+ extractPat (L.PApp _ _ pats) = concatMap extractPat pats
+- extractPat (L.PTuple _ pats) = concatMap extractPat pats
++ extractPat (L.PTuple _ _ pats) = concatMap extractPat pats
+ extractPat (L.PList _ pats) = concatMap extractPat pats
+ extractPat (L.PParen _ pat) = extractPat pat
+ extractPat (L.PAsPat _ name pat) = extractName name ++ extractPat pat
+@@ -175,11 +175,12 @@
+ haskellSource :: FilePath -> IO String
+ haskellSource file = do
+ contents <- readFile file
+- let needsCpp = maybe False (L.CPP `elem`) (L.readExtensions contents)
++ let needsCpp = maybe False ((L.EnableExtension L.CPP) `elem`) $ exts contents
+ if needsCpp
+ then CPP.runCpphs cppOpts file contents
+ else return contents
+ where
++ exts contents = fmap (\(_, exts') -> exts') $ L.readExtensions contents
+ cppOpts = CPP.defaultCpphsOptions { CPP.boolopts = CPP.defaultBoolOptions { CPP.hashline = False } }
+
+
+@@ -198,7 +199,10 @@
+ where
+ mode filename = L.ParseMode {
+ L.parseFilename = filename,
+- L.extensions = [L.MultiParamTypeClasses, L.ExistentialQuantification, L.FlexibleContexts],
++ L.baseLanguage = L.Haskell98,
++ L.extensions = [L.EnableExtension L.MultiParamTypeClasses,
++ L.EnableExtension L.ExistentialQuantification,
++ L.EnableExtension L.FlexibleContexts],
+ L.ignoreLanguagePragmas = False,
+ L.ignoreLinePragmas = False,
+ L.fixities = Nothing
+--- a/hothasktags.cabal
++++ b/hothasktags.cabal
+@@ -37,7 +37,7 @@
+ base == 4.*,
+ containers,
+ filepath,
+- haskell-src-exts >= 1.11 && < 1.14,
++ haskell-src-exts >= 1.14 && < 1.15,
+ cpphs >= 1.11 && < 1.17
+ main-is: Main.hs
+ ghc-options: -W
diff -rN -u old-tools/all-packages/patches/hothasktags/0.3.1/series new-tools/all-packages/patches/hothasktags/0.3.1/series
--- old-tools/all-packages/patches/hothasktags/0.3.1/series 1970-01-01 00:00:00.000000000 +0000
+++ new-tools/all-packages/patches/hothasktags/0.3.1/series 2014-03-07 18:35:22.957324665 +0000
@@ -0,0 +1 @@
+00-bump-haskell-src-exts-version
More information about the Pkg-haskell-commits
mailing list