[Pkg-haskell-commits] darcs: haskell-hsx: Fix FTBFS when building against haskell-src-exts >= 1.14.0
Raúl Benencia
rul at kalgan.cc
Thu Oct 31 20:27:02 UTC 2013
Thu Oct 31 20:16:55 UTC 2013 Ra[_<U+00FA>_]l Benencia <rul at kalgan.cc>
* Fix FTBFS when building against haskell-src-exts >= 1.14.0
At the moment there is an updated version of upstream, but it only adds an
upper bound constraint against haskell-src-exts library.
http://hdiff.luite.com/cgit/hsx/diff/?id=0.10.5&id2=0.10.4
I've decided to patch this version, forward the patch to upstream author
and, in the future, update the Debian package with the fixed upstream
package.
M ./changelog +4
A ./patches/
A ./patches/fix-ftbfs.patch
A ./patches/series
Thu Oct 31 20:16:55 UTC 2013 Raúl Benencia <rul at kalgan.cc>
* Fix FTBFS when building against haskell-src-exts >= 1.14.0
At the moment there is an updated version of upstream, but it only adds an
upper bound constraint against haskell-src-exts library.
http://hdiff.luite.com/cgit/hsx/diff/?id=0.10.5&id2=0.10.4
I've decided to patch this version, forward the patch to upstream author
and, in the future, update the Debian package with the fixed upstream
package.
diff -rN -u old-haskell-hsx/changelog new-haskell-hsx/changelog
--- old-haskell-hsx/changelog 2013-10-31 20:27:01.921591820 +0000
+++ new-haskell-hsx/changelog 2013-10-31 20:27:01.941547299 +0000
@@ -1,9 +1,13 @@
haskell-hsx (0.10.4-3) UNRELEASED; urgency=low
+ [ Joachim Breitner ]
* Fix Vcs-Darcs url: http://darcs.debian.org/ instead of
http://darcs.debian.org/darcs/
* Adjust watch file to new hackage layout
+ [ Raúl Benencia ]
+ * Fix FTBFS when building against haskell-src-exts >= 1.14.0
+
-- Joachim Breitner <nomeata at debian.org> Sat, 25 May 2013 17:01:38 +0200
haskell-hsx (0.10.4-2) unstable; urgency=low
diff -rN -u old-haskell-hsx/patches/fix-ftbfs.patch new-haskell-hsx/patches/fix-ftbfs.patch
--- old-haskell-hsx/patches/fix-ftbfs.patch 1970-01-01 00:00:00.000000000 +0000
+++ new-haskell-hsx/patches/fix-ftbfs.patch 2013-10-31 20:27:01.937538476 +0000
@@ -0,0 +1,77 @@
+Description: Fix FTBFS
+ This patch fix a FTBFS when trying to build this haskell-hsx against
+ haskell-src-exts >= 1.14. It is heavily based on patch for the package
+ haskell-hsx2hs:
+ http://hub.darcs.net/nibro/hsx2hs/patch/20130927224058-91e9f
+Author: Raúl Benencia <rul at kalgan.cc>
+--- a/src/HSX/Transform.hs
++++ b/src/HSX/Transform.hs
+@@ -348,7 +348,7 @@
+ App e1 e2 -> transform2exp e1 e2 App
+ NegApp e -> fmap NegApp $ transformExpM e
+ If e1 e2 e3 -> transform3exp e1 e2 e3 If
+- Tuple es -> fmap Tuple $ mapM transformExpM es
++ Tuple bx es -> fmap (Tuple bx) $ mapM transformExpM es
+ List es -> fmap List $ mapM transformExpM es
+ Paren e -> fmap Paren $ transformExpM e
+ LeftSection e op -> do e' <- transformExpM e
+@@ -692,7 +692,7 @@
+ (\p1 p2 -> PInfixApp p1 n p2)
+ renameRP
+ PApp n ps -> renameNpat ps (PApp n) renameRP
+- PTuple ps -> renameNpat ps PTuple renameRP
++ PTuple bx ps -> renameNpat ps (PTuple bx) renameRP
+ PList ps -> renameNpat ps PList renameRP
+ PParen p -> rename1pat p PParen renameRP
+ PRec n pfs -> renameNpat pfs (PRec n) renameRPf
+@@ -756,7 +756,7 @@
+ (\p1 p2 -> PInfixApp p1 n p2)
+ renameIrrP
+ PApp n ps -> renameNpat ps (PApp n) renameIrrP
+- PTuple ps -> renameNpat ps PTuple renameIrrP
++ PTuple bx ps -> renameNpat ps (PTuple bx) renameIrrP
+ PList ps -> renameNpat ps PList renameIrrP
+ PParen p -> rename1pat p PParen renameIrrP
+ PRec n pfs -> renameNpat pfs (PRec n) renameIrrPf
+@@ -984,7 +984,7 @@
+ PNeg q -> tr1pat q PNeg (trPattern s)
+ PInfixApp p1 op p2 -> tr2pat p1 p2 (\p1 p2 -> PInfixApp p1 op p2) (trPattern s)
+ PApp n ps -> trNpat ps (PApp n) (trPattern s)
+- PTuple ps -> trNpat ps PTuple (trPattern s)
++ PTuple bx ps -> trNpat ps (PTuple bx) (trPattern s)
+ PList ps -> trNpat ps PList (trPattern s)
+ PParen p -> tr1pat p PParen (trPattern s)
+ PRec n pfs -> trNpat pfs (PRec n) (trPatternField s)
+@@ -1481,7 +1481,7 @@
+ PInfixApp p1 _ p2 -> gatherPVars p1 ++
+ gatherPVars p2
+ PApp _ ps -> concatMap gatherPVars ps
+- PTuple ps -> concatMap gatherPVars ps
++ PTuple _ ps -> concatMap gatherPVars ps
+ PList ps -> concatMap gatherPVars ps
+ PParen p -> gatherPVars p
+ PRec _ pfs -> concatMap help pfs
+--- a/src/Trhsx.hs
++++ b/src/Trhsx.hs
+@@ -64,14 +64,15 @@
+ transform $ checkParse $ parse fp fc
+
+ parse :: String -> String -> ParseResult Module
+-parse fn fc = parseModuleWithMode (ParseMode fn allExtensions False True (Just baseFixities)) fcuc
++parse fn fc = parseModuleWithMode (ParseMode fn Haskell2010 allExtensions False True (Just baseFixities)) fcuc
+ where fcuc= unlines $ filter (not . isPrefixOf "#") $ lines fc
+
+ usageString :: String
+ usageString = "Usage: trhsx <infile> [<outfile>]"
+
+-allExtensions = [RecursiveDo,ParallelListComp,MultiParamTypeClasses,FunctionalDependencies,RankNTypes,ExistentialQuantification,
+- ScopedTypeVariables,ImplicitParams,FlexibleContexts,FlexibleInstances,EmptyDataDecls,KindSignatures,
+- BangPatterns,TemplateHaskell,ForeignFunctionInterface,Arrows,Generics,NamedFieldPuns,PatternGuards,
+- MagicHash,TypeFamilies,StandaloneDeriving,TypeOperators,RecordWildCards,GADTs,UnboxedTuples,
+- PackageImports,QuasiQuotes,TransformListComp,ViewPatterns,XmlSyntax,RegularPatterns]
++allExtensions = map EnableExtension
++ [RecursiveDo,ParallelListComp,MultiParamTypeClasses,FunctionalDependencies,RankNTypes,ExistentialQuantification,
++ ScopedTypeVariables,ImplicitParams,FlexibleContexts,FlexibleInstances,EmptyDataDecls,KindSignatures,
++ BangPatterns,TemplateHaskell,ForeignFunctionInterface,Arrows,Generics,NamedFieldPuns,PatternGuards,
++ MagicHash,TypeFamilies,StandaloneDeriving,TypeOperators,RecordWildCards,GADTs,UnboxedTuples,
++ PackageImports,QuasiQuotes,TransformListComp,ViewPatterns,XmlSyntax,RegularPatterns]
diff -rN -u old-haskell-hsx/patches/series new-haskell-hsx/patches/series
--- old-haskell-hsx/patches/series 1970-01-01 00:00:00.000000000 +0000
+++ new-haskell-hsx/patches/series 2013-10-31 20:27:01.937538476 +0000
@@ -0,0 +1 @@
+fix-ftbfs.patch
More information about the Pkg-haskell-commits
mailing list