Control: tag -1 + patch

Hello,

On Sat, Jun 22, 2013 at 02:36:16PM +0200, Lucas Nussbaum wrote:
> During a rebuild of all packages in sid, your package failed to build on
> amd64.
> 
> Relevant part:
> > make[3]: Entering directory `/«PKGBUILDDIR»/src'
> > ghc -O2 -i. -i. -hidir . -odir . -o DrIFT --make ./DrIFT.hs
> > [ 1 of 23] Compiling Unlit            ( Unlit.hs, Unlit.o )
> > [ 2 of 23] Compiling ParseLib2        ( ParseLib2.hs, ParseLib2.o )
> > [ 3 of 23] Compiling Version          ( Version.hs, Version.o )
> > [ 4 of 23] Compiling Pretty           ( Pretty.lhs, Pretty.o )
> > [ 5 of 23] Compiling GetOpt           ( GetOpt.hs, GetOpt.o )
> > [ 6 of 23] Compiling GenUtil          ( GenUtil.hs, GenUtil.o )
> > 
> > GenUtil.hs:290:14: Not in scope: `catch'
> > 
> > GenUtil.hs:293:15: Not in scope: `catch'
> > 
> > GenUtil.hs:387:15: Not in scope: `catch'
> > make[3]: *** [DrIFT] Error 1
The error looks different now, but the statement that drift doesn't
build is still true. I dived deep enough into Haskell (again) to fix
this.

I'm currently in NM trying to become DD. As part of the process I
prepared an NMU for this with the following debdiff. It's that big
because I converted the package from dpatch to 3.0 (quilt).

I assume the that Thijs will upload this nmu to a delayed queue
(assuming he is happy with it).

Best regards
Uwe

diff -Nru drift-2.2.3/debian/changelog drift-2.2.3/debian/changelog
--- drift-2.2.3/debian/changelog        2015-08-16 22:41:10.000000000 +0200
+++ drift-2.2.3/debian/changelog        2015-08-16 22:37:02.000000000 +0200
@@ -1,3 +1,12 @@
+drift (2.2.3-2.3) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * convert from dpatch to format 3.0 (quilt) folding local changed files into
+    ghc-7.4-fixes.patch
+  * fix build errors with ghc 7.6 (Closes: #713313, #753765)
+
+ -- Uwe Kleine-König <u...@kleine-koenig.org>  Sun, 16 Aug 2015 22:37:02 +0200
+
 drift (2.2.3-2.2) unstable; urgency=low
 
   * Non-maintainer upload.
diff -Nru drift-2.2.3/debian/control drift-2.2.3/debian/control
--- drift-2.2.3/debian/control  2015-08-16 22:41:10.000000000 +0200
+++ drift-2.2.3/debian/control  2015-08-16 22:15:25.000000000 +0200
@@ -2,7 +2,7 @@
 Section: devel
 Priority: optional
 Maintainer: Arjan Oosting <ar...@debian.org>
-Build-Depends: cdbs (>= 0.4.23-1.1), autotools-dev, debhelper (>= 5.0.0), 
dpatch, ghc, texlive-latex-base | tetex-bin, tex-common (>= 0.23), texinfo, 
texi2html, libghc-random-dev
+Build-Depends: cdbs (>= 0.4.23-1.1), autotools-dev, debhelper (>= 5.0.0), ghc, 
texlive-latex-base | tetex-bin, tex-common (>= 0.23), texinfo, texi2html, 
libghc-random-dev
 Standards-Version: 3.7.3
 Vcs-Svn: svn://svn.debian.org/svn/pkg-haskell/packages/drift/trunk
 Vcs-Browser: http://svn.debian.org/wsvn/pkg-haskell/packages/drift/trunk
diff -Nru drift-2.2.3/debian/patches/00list drift-2.2.3/debian/patches/00list
--- drift-2.2.3/debian/patches/00list   2015-08-16 22:41:10.000000000 +0200
+++ drift-2.2.3/debian/patches/00list   1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-ghc-7.4-fixes.dpatch
diff -Nru drift-2.2.3/debian/patches/ghc-7.4-fixes.dpatch 
drift-2.2.3/debian/patches/ghc-7.4-fixes.dpatch
--- drift-2.2.3/debian/patches/ghc-7.4-fixes.dpatch     2015-08-16 
22:41:10.000000000 +0200
+++ drift-2.2.3/debian/patches/ghc-7.4-fixes.dpatch     1970-01-01 
01:00:00.000000000 +0100
@@ -1,281 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## Description: Alter imports for new modules exposed by GHC 7.4
-## Origin/Author: Iain Lane <la...@debian.org>
-## Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=669554
-
-@DPATCH@
-diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' 
'--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' 
drift-2.2.3~/src/ChaseImports.hs drift-2.2.3/src/ChaseImports.hs
---- drift-2.2.3~/src/ChaseImports.hs   2008-02-10 14:38:31.000000000 +0000
-+++ drift-2.2.3/src/ChaseImports.hs    2012-09-18 21:23:49.074270747 +0100
-@@ -24,10 +24,10 @@
- import DataP
- import CommandP
- import ParseLib2
--import System
--import List
-+import Data.List
- import qualified Unlit
--import Monad
-+import Control.Monad
-+import System.Environment(getEnv)
- import GenUtil
- 
- try x = catch (x >>= return . Right) (return . Left)
-diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' 
'--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' 
drift-2.2.3~/src/DrIFT.hs drift-2.2.3/src/DrIFT.hs
---- drift-2.2.3~/src/DrIFT.hs  2012-09-18 21:20:20.000000000 +0100
-+++ drift-2.2.3/src/DrIFT.hs   2012-09-18 21:23:49.074270747 +0100
-@@ -7,10 +7,10 @@
- import DataP
- import GenUtil
- import GetOpt
--import Char
--import IO hiding(try)
--import List (partition,isSuffixOf,sort, groupBy, sortBy)
--import Monad(unless)
-+import Data.Char
-+import System.IO
-+import Data.List (partition,isSuffixOf,sort, groupBy, sortBy)
-+import Control.Monad(unless)
- import PreludData(preludeData)
- import Pretty
- import RuleUtils (commentLine,texts)
-@@ -78,7 +78,7 @@
- 
- header = "Usage: DrIFT [OPTION...] file"
- main = do
--    argv <- System.getArgs
-+    argv <- getArgs
-     (env,n) <- case (getOpt Permute options argv) of
-       (as,n,[]) -> return (foldr ($) env as ,n)
-       (_,_,errs) -> putErrDie (concat errs ++ usageInfo header options)
-diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' 
'--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' 
drift-2.2.3~/src/GenUtil.hs drift-2.2.3/src/GenUtil.hs
---- drift-2.2.3~/src/GenUtil.hs        2008-02-10 14:38:31.000000000 +0000
-+++ drift-2.2.3/src/GenUtil.hs 2012-09-18 21:23:49.078270747 +0100
-@@ -39,7 +39,7 @@
-     -- ** Simple deconstruction
-     fromLeft,fromRight,fsts,snds,splitEither,rights,lefts,
-     -- ** System routines
--    exitSuccess, System.exitFailure, epoch, lookupEnv,endOfTime,
-+    exitSuccess, exitFailure, epoch, lookupEnv,endOfTime,
-     -- ** Random routines
-     repMaybe,
-     liftT2, liftT3, liftT4,
-@@ -91,14 +91,17 @@
-     UniqueProducer(..)
-     ) where
- 
--import Char(isAlphaNum, isSpace, toLower,  ord)
--import List(group,sort)
--import List(intersperse, sortBy, groupBy)
--import Monad
--import qualified IO
--import qualified System
--import Random(StdGen, newStdGen, Random(randomR))
--import Time
-+import Data.Char(isAlphaNum, isSpace, toLower,  ord)
-+import Data.List(group,sort)
-+import Data.List(intersperse, sortBy, groupBy)
-+import Control.Monad hiding (replicateM, replicateM_)
-+import System.IO (hPutStr, stderr)
-+import System.IO.Error(isDoesNotExistError)
-+import System.Random(StdGen, newStdGen, Random(randomR))
-+import System.Exit (exitWith, ExitCode(ExitSuccess), exitFailure)
-+import System.Environment
-+import System.Time
-+import Data.Time
- 
- {-# SPECIALIZE snub :: [String] -> [String] #-}
- {-# SPECIALIZE snub :: [Int] -> [Int] #-}
-@@ -127,7 +130,7 @@
- 
- -- | write string to standard error
- putErr :: String -> IO ()
--putErr = IO.hPutStr IO.stderr
-+putErr = hPutStr stderr
- 
- -- | write string and newline to standard error
- putErrLn :: String -> IO ()
-@@ -137,13 +140,13 @@
- -- | write string and newline to standard error,
- -- then exit program with failure.
- putErrDie :: String -> IO a
--putErrDie s = putErrLn s >> System.exitFailure
-+putErrDie s = putErrLn s >> exitFailure
- 
- 
- -- | exit program successfully. 'exitFailure' is
- -- also exported from System.
- exitSuccess :: IO a
--exitSuccess = System.exitWith System.ExitSuccess
-+exitSuccess = exitWith ExitSuccess
- 
- 
- {-# INLINE fromRight #-}
-@@ -381,7 +384,7 @@
- -- | looks up an enviornment variable and returns it in a 'MonadPlus' rather
- -- than raising an exception if the variable is not set.
- lookupEnv :: MonadPlus m => String -> IO (m String)
--lookupEnv s = catch (fmap return $ System.getEnv s) (\e -> if 
IO.isDoesNotExistError e then return mzero else ioError e)
-+lookupEnv s = catch (fmap return $ getEnv s) (\e -> if isDoesNotExistError e 
then return mzero else ioError e)
- 
- {-# SPECIALIZE fmapLeft :: (a -> c) -> [(Either a b)] -> [(Either c b)] #-}
- fmapLeft :: Functor f => (a -> c) -> f (Either a b) -> f (Either c b)
-@@ -482,7 +485,7 @@
- _ `overlaps` _ = True
- 
- -- | translate a number of seconds to a string representing the duration 
expressed.
--showDuration :: Integral a => a -> String
-+showDuration :: (Show a, Integral a) => a -> String
- showDuration x = st "d" dayI ++ st "h" hourI ++ st "m" minI ++ show secI ++ 
"s" where
-         (dayI, hourI) = divMod hourI' 24
-         (hourI', minI) = divMod minI' 60
-@@ -495,7 +498,7 @@
- -- arguments are given, read stdin.
- 
- getArgContents = do
--    as <- System.getArgs
-+    as <- getArgs
-     let f "-" = getContents
-         f fn = readFile fn
-     cs <- mapM f as
-diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' 
'--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' 
drift-2.2.3~/src/GetOpt.hs drift-2.2.3/src/GetOpt.hs
---- drift-2.2.3~/src/GetOpt.hs 2008-02-10 14:38:31.000000000 +0000
-+++ drift-2.2.3/src/GetOpt.hs  2012-09-18 21:23:49.074270747 +0100
-@@ -21,7 +21,7 @@
-    ArgOrder(..), OptDescr(..), ArgDescr(..), usageInfo, getOpt
-    ) where
- 
--import List(isPrefixOf)
-+import Data.List(isPrefixOf)
- 
- data ArgOrder a                        -- what to do with options following 
non-options:
-    = RequireOrder                      --    no option processing after first 
non-option
-diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' 
'--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' 
drift-2.2.3~/src/Rules/Arbitrary.hs drift-2.2.3/src/Rules/Arbitrary.hs
---- drift-2.2.3~/src/Rules/Arbitrary.hs        2008-02-10 14:38:31.000000000 
+0000
-+++ drift-2.2.3/src/Rules/Arbitrary.hs 2012-09-18 21:23:49.078270747 +0100
-@@ -1,6 +1,6 @@
- module Rules.Arbitrary(rules) where
- 
--import List
-+import Data.List
- import RuleUtils
- 
- rules = [
-diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' 
'--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' 
drift-2.2.3~/src/Rules/Binary.hs drift-2.2.3/src/Rules/Binary.hs
---- drift-2.2.3~/src/Rules/Binary.hs   2008-02-10 14:38:31.000000000 +0000
-+++ drift-2.2.3/src/Rules/Binary.hs    2012-09-18 21:23:49.078270747 +0100
-@@ -1,6 +1,6 @@
- module Rules.Binary(rules) where
- 
--import List (nub,intersperse)
-+import Data.List (nub,intersperse)
- import RuleUtils
- 
- rules = [
-diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' 
'--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' 
drift-2.2.3~/src/Rules/BitsBinary.hs drift-2.2.3/src/Rules/BitsBinary.hs
---- drift-2.2.3~/src/Rules/BitsBinary.hs       2008-02-10 14:38:31.000000000 
+0000
-+++ drift-2.2.3/src/Rules/BitsBinary.hs        2012-09-18 21:23:49.078270747 
+0100
-@@ -1,7 +1,7 @@
- -- stub module to add your own rules.
- module Rules.BitsBinary(rules) where
- 
--import List (nub,intersperse)
-+import Data.List (nub,intersperse)
- import RuleUtils -- useful to have a look at this too
- 
- rules = [
-diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' 
'--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' 
drift-2.2.3~/src/Rules/FunctorM.hs drift-2.2.3/src/Rules/FunctorM.hs
---- drift-2.2.3~/src/Rules/FunctorM.hs 2008-02-10 14:38:31.000000000 +0000
-+++ drift-2.2.3/src/Rules/FunctorM.hs  2012-09-18 21:23:49.078270747 +0100
-@@ -1,7 +1,7 @@
- -- stub module to add your own rules.
- module Rules.FunctorM (rules) where
- 
--import List
-+import Data.List
- import RuleUtils
- 
- rules = [
-diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' 
'--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' 
drift-2.2.3~/src/Rules/Generic.hs drift-2.2.3/src/Rules/Generic.hs
---- drift-2.2.3~/src/Rules/Generic.hs  2008-02-10 14:38:31.000000000 +0000
-+++ drift-2.2.3/src/Rules/Generic.hs   2012-09-18 21:23:49.078270747 +0100
-@@ -3,7 +3,7 @@
- 
- -- import StandardRules
- import RuleUtils
--import List(intersperse)
-+import Data.List(intersperse)
- 
- 
- rules :: [RuleDef]
-diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' 
'--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' 
drift-2.2.3~/src/Rules/GhcBinary.hs drift-2.2.3/src/Rules/GhcBinary.hs
---- drift-2.2.3~/src/Rules/GhcBinary.hs        2008-02-10 14:38:31.000000000 
+0000
-+++ drift-2.2.3/src/Rules/GhcBinary.hs 2012-09-18 21:23:49.078270747 +0100
-@@ -1,7 +1,7 @@
- -- stub module to add your own rules.
- module Rules.GhcBinary (rules) where
- 
--import List (nub,intersperse)
-+import Data.List (nub,intersperse)
- import RuleUtils -- useful to have a look at this too
- 
- rules = [
-diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' 
'--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' 
drift-2.2.3~/src/Rules/Monoid.hs drift-2.2.3/src/Rules/Monoid.hs
---- drift-2.2.3~/src/Rules/Monoid.hs   2008-02-10 14:38:31.000000000 +0000
-+++ drift-2.2.3/src/Rules/Monoid.hs    2012-09-18 21:23:49.078270747 +0100
-@@ -1,7 +1,7 @@
- -- stub module to add your own rules.
- module Rules.Monoid (rules) where
- 
--import List
-+import Data.List
- import RuleUtils
- 
- rules = [
-diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' 
'--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' 
drift-2.2.3~/src/Rules/Standard.hs drift-2.2.3/src/Rules/Standard.hs
---- drift-2.2.3~/src/Rules/Standard.hs 2008-02-10 14:38:31.000000000 +0000
-+++ drift-2.2.3/src/Rules/Standard.hs  2012-09-18 21:23:49.078270747 +0100
-@@ -1,7 +1,7 @@
- module Rules.Standard(rules) where
- 
- import RuleUtils
--import List
-+import Data.List
- import GenUtil
- 
- 
-diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' 
'--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' 
drift-2.2.3~/src/Rules/Utility.hs drift-2.2.3/src/Rules/Utility.hs
---- drift-2.2.3~/src/Rules/Utility.hs  2008-02-10 14:38:31.000000000 +0000
-+++ drift-2.2.3/src/Rules/Utility.hs   2012-09-18 21:23:49.078270747 +0100
-@@ -1,6 +1,6 @@
- module Rules.Utility(rules) where
- import RuleUtils
--import List
-+import Data.List
- import GenUtil
- 
- rules :: [RuleDef]
-diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' 
'--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' 
drift-2.2.3~/src/Rules/Xml.hs drift-2.2.3/src/Rules/Xml.hs
---- drift-2.2.3~/src/Rules/Xml.hs      2008-02-10 14:38:31.000000000 +0000
-+++ drift-2.2.3/src/Rules/Xml.hs       2012-09-18 21:23:49.078270747 +0100
-@@ -1,7 +1,7 @@
- -- expanded from stub module to add new rules.
- module Rules.Xml(rules) where
- 
--import List (nub,sortBy)
-+import Data.List (nub,sortBy)
- import RuleUtils -- useful to have a look at this too
- 
- rules :: [RuleDef]
-diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' 
'--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' 
drift-2.2.3~/src/Unlit.hs drift-2.2.3/src/Unlit.hs
---- drift-2.2.3~/src/Unlit.hs  2008-02-10 14:38:31.000000000 +0000
-+++ drift-2.2.3/src/Unlit.hs   2012-09-18 21:23:49.074270747 +0100
-@@ -5,7 +5,7 @@
- --   version 1.2, appendix C.
- 
- 
--import Char
-+import Data.Char
- 
- data Classified = Program String | Blank | Comment
-                 | Include Int String | Pre String
diff -Nru drift-2.2.3/debian/patches/ghc-7.4-fixes.patch 
drift-2.2.3/debian/patches/ghc-7.4-fixes.patch
--- drift-2.2.3/debian/patches/ghc-7.4-fixes.patch      1970-01-01 
01:00:00.000000000 +0100
+++ drift-2.2.3/debian/patches/ghc-7.4-fixes.patch      2015-08-16 
22:15:25.000000000 +0200
@@ -0,0 +1,302 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## Description: Alter imports for new modules exposed by GHC 7.4
+## Origin/Author: Iain Lane <la...@debian.org>
+## Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=669554
+
+@DPATCH@
+--- a/src/ChaseImports.hs
++++ b/src/ChaseImports.hs
+@@ -24,10 +24,10 @@
+ import DataP
+ import CommandP
+ import ParseLib2
+-import System
+-import List
++import Data.List
+ import qualified Unlit
+-import Monad
++import Control.Monad
++import System.Environment(getEnv)
+ import GenUtil
+ 
+ try x = catch (x >>= return . Right) (return . Left)
+--- a/src/DrIFT.hs
++++ b/src/DrIFT.hs
+@@ -7,17 +7,17 @@
+ import DataP
+ import GenUtil
+ import GetOpt
+-import Char
+-import IO hiding(try)
+-import List (partition,isSuffixOf,sort, groupBy, sortBy)
+-import Monad(unless)
++import Data.Char
++import System.IO
++import Data.List (partition,isSuffixOf,sort, groupBy, sortBy)
++import Control.Monad(unless)
+ import PreludData(preludeData)
+ import Pretty
+ import RuleUtils (commentLine,texts)
+ import RuleUtils(Rule,Tag)
+ import Version
+ import qualified Rules(rules)
+-import qualified System
++import System.Environment (getArgs)
+ 
+ data Op = OpList | OpDerive | OpVersion
+ 
+@@ -78,7 +78,7 @@
+ 
+ header = "Usage: DrIFT [OPTION...] file"
+ main = do
+-    argv <- System.getArgs
++    argv <- getArgs
+     (env,n) <- case (getOpt Permute options argv) of
+       (as,n,[]) -> return (foldr ($) env as ,n)
+       (_,_,errs) -> putErrDie (concat errs ++ usageInfo header options)
+--- a/src/GenUtil.hs
++++ b/src/GenUtil.hs
+@@ -39,7 +39,7 @@
+     -- ** Simple deconstruction
+     fromLeft,fromRight,fsts,snds,splitEither,rights,lefts,
+     -- ** System routines
+-    exitSuccess, System.exitFailure, epoch, lookupEnv,endOfTime,
++    exitSuccess, exitFailure, epoch, lookupEnv,endOfTime,
+     -- ** Random routines
+     repMaybe,
+     liftT2, liftT3, liftT4,
+@@ -91,14 +91,17 @@
+     UniqueProducer(..)
+     ) where
+ 
+-import Char(isAlphaNum, isSpace, toLower,  ord)
+-import List(group,sort)
+-import List(intersperse, sortBy, groupBy)
+-import Monad
+-import qualified IO
+-import qualified System
+-import Random(StdGen, newStdGen, Random(randomR))
+-import Time
++import Data.Char(isAlphaNum, isSpace, toLower,  ord)
++import Data.List(group,sort)
++import Data.List(intersperse, sortBy, groupBy)
++import Control.Monad hiding (replicateM, replicateM_)
++import System.IO (hPutStr, stderr)
++import System.IO.Error(isDoesNotExistError)
++import System.Random(StdGen, newStdGen, Random(randomR))
++import System.Exit (exitWith, ExitCode(ExitSuccess), exitFailure)
++import System.Environment
++import System.Time
++import Data.Time
+ 
+ {-# SPECIALIZE snub :: [String] -> [String] #-}
+ {-# SPECIALIZE snub :: [Int] -> [Int] #-}
+@@ -127,7 +130,7 @@
+ 
+ -- | write string to standard error
+ putErr :: String -> IO ()
+-putErr = IO.hPutStr IO.stderr
++putErr = hPutStr stderr
+ 
+ -- | write string and newline to standard error
+ putErrLn :: String -> IO ()
+@@ -137,13 +140,13 @@
+ -- | write string and newline to standard error,
+ -- then exit program with failure.
+ putErrDie :: String -> IO a
+-putErrDie s = putErrLn s >> System.exitFailure
++putErrDie s = putErrLn s >> exitFailure
+ 
+ 
+ -- | exit program successfully. 'exitFailure' is
+ -- also exported from System.
+ exitSuccess :: IO a
+-exitSuccess = System.exitWith System.ExitSuccess
++exitSuccess = exitWith ExitSuccess
+ 
+ 
+ {-# INLINE fromRight #-}
+@@ -381,7 +384,7 @@
+ -- | looks up an enviornment variable and returns it in a 'MonadPlus' rather
+ -- than raising an exception if the variable is not set.
+ lookupEnv :: MonadPlus m => String -> IO (m String)
+-lookupEnv s = catch (fmap return $ System.getEnv s) (\e -> if 
IO.isDoesNotExistError e then return mzero else ioError e)
++lookupEnv s = catch (fmap return $ getEnv s) (\e -> if isDoesNotExistError e 
then return mzero else ioError e)
+ 
+ {-# SPECIALIZE fmapLeft :: (a -> c) -> [(Either a b)] -> [(Either c b)] #-}
+ fmapLeft :: Functor f => (a -> c) -> f (Either a b) -> f (Either c b)
+@@ -482,7 +485,7 @@
+ _ `overlaps` _ = True
+ 
+ -- | translate a number of seconds to a string representing the duration 
expressed.
+-showDuration :: Integral a => a -> String
++showDuration :: (Show a, Integral a) => a -> String
+ showDuration x = st "d" dayI ++ st "h" hourI ++ st "m" minI ++ show secI ++ 
"s" where
+         (dayI, hourI) = divMod hourI' 24
+         (hourI', minI) = divMod minI' 60
+@@ -495,7 +498,7 @@
+ -- arguments are given, read stdin.
+ 
+ getArgContents = do
+-    as <- System.getArgs
++    as <- getArgs
+     let f "-" = getContents
+         f fn = readFile fn
+     cs <- mapM f as
+--- a/src/GetOpt.hs
++++ b/src/GetOpt.hs
+@@ -21,7 +21,7 @@
+    ArgOrder(..), OptDescr(..), ArgDescr(..), usageInfo, getOpt
+    ) where
+ 
+-import List(isPrefixOf)
++import Data.List(isPrefixOf)
+ 
+ data ArgOrder a                        -- what to do with options following 
non-options:
+    = RequireOrder                      --    no option processing after first 
non-option
+--- a/src/Rules/Arbitrary.hs
++++ b/src/Rules/Arbitrary.hs
+@@ -1,6 +1,6 @@
+ module Rules.Arbitrary(rules) where
+ 
+-import List
++import Data.List
+ import RuleUtils
+ 
+ rules = [
+--- a/src/Rules/Binary.hs
++++ b/src/Rules/Binary.hs
+@@ -1,6 +1,6 @@
+ module Rules.Binary(rules) where
+ 
+-import List (nub,intersperse)
++import Data.List (nub,intersperse)
+ import RuleUtils
+ 
+ rules = [
+--- a/src/Rules/BitsBinary.hs
++++ b/src/Rules/BitsBinary.hs
+@@ -1,7 +1,7 @@
+ -- stub module to add your own rules.
+ module Rules.BitsBinary(rules) where
+ 
+-import List (nub,intersperse)
++import Data.List (nub,intersperse)
+ import RuleUtils -- useful to have a look at this too
+ 
+ rules = [
+--- a/src/Rules/FunctorM.hs
++++ b/src/Rules/FunctorM.hs
+@@ -1,7 +1,7 @@
+ -- stub module to add your own rules.
+ module Rules.FunctorM (rules) where
+ 
+-import List
++import Data.List
+ import RuleUtils
+ 
+ rules = [
+--- a/src/Rules/Generic.hs
++++ b/src/Rules/Generic.hs
+@@ -3,7 +3,7 @@
+ 
+ -- import StandardRules
+ import RuleUtils
+-import List(intersperse)
++import Data.List(intersperse)
+ 
+ 
+ rules :: [RuleDef]
+--- a/src/Rules/GhcBinary.hs
++++ b/src/Rules/GhcBinary.hs
+@@ -1,7 +1,7 @@
+ -- stub module to add your own rules.
+ module Rules.GhcBinary (rules) where
+ 
+-import List (nub,intersperse)
++import Data.List (nub,intersperse)
+ import RuleUtils -- useful to have a look at this too
+ 
+ rules = [
+--- a/src/Rules/Monoid.hs
++++ b/src/Rules/Monoid.hs
+@@ -1,7 +1,7 @@
+ -- stub module to add your own rules.
+ module Rules.Monoid (rules) where
+ 
+-import List
++import Data.List
+ import RuleUtils
+ 
+ rules = [
+--- a/src/Rules/Standard.hs
++++ b/src/Rules/Standard.hs
+@@ -1,7 +1,7 @@
+ module Rules.Standard(rules) where
+ 
+ import RuleUtils
+-import List
++import Data.List
+ import GenUtil
+ 
+ 
+--- a/src/Rules/Utility.hs
++++ b/src/Rules/Utility.hs
+@@ -1,6 +1,6 @@
+ module Rules.Utility(rules) where
+ import RuleUtils
+-import List
++import Data.List
+ import GenUtil
+ 
+ rules :: [RuleDef]
+--- a/src/Rules/Xml.hs
++++ b/src/Rules/Xml.hs
+@@ -1,7 +1,7 @@
+ -- expanded from stub module to add new rules.
+ module Rules.Xml(rules) where
+ 
+-import List (nub,sortBy)
++import Data.List (nub,sortBy)
+ import RuleUtils -- useful to have a look at this too
+ 
+ rules :: [RuleDef]
+--- a/src/Unlit.hs
++++ b/src/Unlit.hs
+@@ -5,7 +5,7 @@
+ --   version 1.2, appendix C.
+ 
+ 
+-import Char
++import Data.Char
+ 
+ data Classified = Program String | Blank | Comment
+                 | Include Int String | Pre String
+--- a/src/DataP.lhs
++++ b/src/DataP.lhs
+@@ -10,9 +10,9 @@
+ >where
+ 
+ >import ParseLib2
+->import Char
+->import List
+->import Monad
++>import Data.Char
++>import Data.List
++>import Control.Monad
+ 
+ 
+ >data Statement = DataStmt | NewTypeStmt deriving (Eq,Show)
+--- a/src/ParseLib2.hs
++++ b/src/ParseLib2.hs
+@@ -31,8 +31,8 @@
+     many1_offside,many_offside,off,
+     opt, skipUntil, skipUntilOff,skipUntilParse,skipNest) where
+ 
+-import Char
+-import Monad
++import Data.Char
++import Control.Monad
+ 
+ infixr 5 +++
+ 
diff -Nru drift-2.2.3/debian/patches/ghc-7.6-fixes.patch 
drift-2.2.3/debian/patches/ghc-7.6-fixes.patch
--- drift-2.2.3/debian/patches/ghc-7.6-fixes.patch      1970-01-01 
01:00:00.000000000 +0100
+++ drift-2.2.3/debian/patches/ghc-7.6-fixes.patch      2015-08-16 
22:36:55.000000000 +0200
@@ -0,0 +1,48 @@
+--- a/src/GenUtil.hs
++++ b/src/GenUtil.hs
+@@ -96,16 +96,18 @@
+ import Data.List(intersperse, sortBy, groupBy)
+ import Control.Monad hiding (replicateM, replicateM_)
+ import System.IO (hPutStr, stderr)
+-import System.IO.Error(isDoesNotExistError)
++import System.IO.Error(isDoesNotExistError, catchIOError)
+ import System.Random(StdGen, newStdGen, Random(randomR))
+ import System.Exit (exitWith, ExitCode(ExitSuccess), exitFailure)
+-import System.Environment
++import System.Environment hiding (lookupEnv)
+ import System.Time
+ import Data.Time
+ 
+ {-# SPECIALIZE snub :: [String] -> [String] #-}
+ {-# SPECIALIZE snub :: [Int] -> [Int] #-}
+ 
++catch = catchIOError
++
+ -- | sorted nub of list, much more efficient than nub, but doesnt preserve 
ordering.
+ snub :: Ord a => [a] -> [a]
+ snub = map head . group . sort
+@@ -286,8 +288,8 @@
+ lefts :: [Either a b] -> [a]
+ lefts xs = [x | Left x <- xs]
+ 
+-ioM :: Monad m => IO a -> IO (m a)
+-ioM action = catch (fmap return action) (\e -> return (fail (show e)))
++--ioM :: Monad m => IO a -> IO (m a)
++ioM action = catch (fmap return action) (\e -> return (fail "hoppla"))
+ 
+ ioMp :: MonadPlus m => IO a -> IO (m a)
+ ioMp action = catch (fmap return action) (\_ -> return mzero)
+--- a/src/ChaseImports.hs
++++ b/src/ChaseImports.hs
+@@ -28,9 +28,10 @@
+ import qualified Unlit
+ import Control.Monad
+ import System.Environment(getEnv)
++import System.IO.Error(catchIOError)
+ import GenUtil
+ 
+-try x = catch (x >>= return . Right) (return . Left)
++try x = catchIOError (x >>= return . Right) (return . Left)
+ 
+ --- Split up input ---------------------------------------------------------
+ splitString :: String -> String -> (String,String)
diff -Nru drift-2.2.3/debian/patches/series drift-2.2.3/debian/patches/series
--- drift-2.2.3/debian/patches/series   1970-01-01 01:00:00.000000000 +0100
+++ drift-2.2.3/debian/patches/series   2015-08-16 22:36:55.000000000 +0200
@@ -0,0 +1,2 @@
+ghc-7.4-fixes.patch
+ghc-7.6-fixes.patch
diff -Nru drift-2.2.3/debian/rules drift-2.2.3/debian/rules
--- drift-2.2.3/debian/rules    2015-08-16 22:41:10.000000000 +0200
+++ drift-2.2.3/debian/rules    2015-08-16 22:15:25.000000000 +0200
@@ -2,7 +2,6 @@
 
 include /usr/share/cdbs/1/class/autotools.mk
 include /usr/share/cdbs/1/rules/debhelper.mk
-include /usr/share/cdbs/1/rules/dpatch.mk
 
 DEB_CONFIGURE_EXTRA_FLAGS := --with-hc=ghc
 
diff -Nru drift-2.2.3/debian/source/format drift-2.2.3/debian/source/format
--- drift-2.2.3/debian/source/format    1970-01-01 01:00:00.000000000 +0100
+++ drift-2.2.3/debian/source/format    2015-08-16 22:15:25.000000000 +0200
@@ -0,0 +1 @@
+3.0 (quilt)
diff -Nru drift-2.2.3/src/DataP.lhs drift-2.2.3/src/DataP.lhs
--- drift-2.2.3/src/DataP.lhs   2015-08-16 22:41:10.000000000 +0200
+++ drift-2.2.3/src/DataP.lhs   2008-02-10 15:38:31.000000000 +0100
@@ -10,9 +10,9 @@
 >where
 
 >import ParseLib2
->import Data.Char
->import Data.List
->import Control.Monad
+>import Char
+>import List
+>import Monad
 
 
 >data Statement = DataStmt | NewTypeStmt deriving (Eq,Show)
diff -Nru drift-2.2.3/src/DrIFT.hs drift-2.2.3/src/DrIFT.hs
--- drift-2.2.3/src/DrIFT.hs    2015-08-16 22:41:10.000000000 +0200
+++ drift-2.2.3/src/DrIFT.hs    2008-02-10 15:38:31.000000000 +0100
@@ -17,7 +17,7 @@
 import RuleUtils(Rule,Tag)
 import Version
 import qualified Rules(rules)
-import System.Environment (getArgs)
+import qualified System
 
 data Op = OpList | OpDerive | OpVersion
 
diff -Nru drift-2.2.3/src/ParseLib2.hs drift-2.2.3/src/ParseLib2.hs
--- drift-2.2.3/src/ParseLib2.hs        2015-08-16 22:41:10.000000000 +0200
+++ drift-2.2.3/src/ParseLib2.hs        2008-02-10 15:38:31.000000000 +0100
@@ -31,8 +31,8 @@
     many1_offside,many_offside,off,
     opt, skipUntil, skipUntilOff,skipUntilParse,skipNest) where
 
-import Data.Char
-import Control.Monad
+import Char
+import Monad
 
 infixr 5 +++
 

Reply via email to