[Pkg-haskell-commits] [SCM] Packaging for Agda branch, master-experimental, updated. debian/2.2.8-1-5-gd807f09
Iain Lane
laney at ubuntu.com
Thu Feb 24 18:30:45 UTC 2011
The following commit has been merged in the master-experimental branch:
commit d807f09fca0f15d4826015e8548a581d555f0447
Author: Iain Lane <laney at ubuntu.com>
Date: Thu Feb 24 18:24:02 2011 +0000
Add new patch from upstream to build against versions of libraries in Debian
diff --git a/debian/patches/relax-build-dependencies b/debian/patches/relax-build-dependencies
new file mode 100644
index 0000000..c9e28bc
--- /dev/null
+++ b/debian/patches/relax-build-dependencies
@@ -0,0 +1,206 @@
+Description: Compile with libraries in Debian
+Author: Nils Anders Danielsson <nils.anders.danielsson at gmail.com>
+Origin: upstream
+Forwarded: not-needed
+
+Thu Feb 24 10:33:21 GMT 2011 Nils Anders Danielsson <nils.anders.danielsson at gmail.com>
+ * Made Agda build using GHC 6.12.3, mtl 1.1.0.2 and QuickCheck 2.1.0.3.
+Index: agda/Agda.cabal
+===================================================================
+--- agda.orig/Agda.cabal 2011-02-24 18:19:56.317593241 +0000
++++ agda/Agda.cabal 2011-02-24 18:22:33.703954610 +0000
+@@ -34,7 +34,7 @@
+ Note also that this library does not follow the package versioning
+ policy, because the library is only intended to be used by the Emacs
+ mode and the Agda-executable package.
+-tested-with: GHC == 6.12.1, GHC == 6.12.3, GHC == 7.0.1
++tested-with: GHC == 6.12.3
+ extra-source-files: src/full/Agda/undefined.h
+ README
+ doc/release-notes/*.txt
+@@ -69,14 +69,14 @@
+ library
+ hs-source-dirs: src/full
+ if flag(use-locale)
+- build-depends: base >= 4.2 && < 4.4
++ build-depends: base >= 4.2 && < 4.3
+ else
+ build-depends: base == 4.1.*,
+ utf8-string == 0.3.*
+ if flag(epic)
+ build-depends: epic >= 0.1.7 && < 0.2
+- build-depends: mtl == 2.0.*,
+- QuickCheck >= 2.3 && < 2.5,
++ build-depends: mtl >= 1.1 && < 2,
++ QuickCheck >= 2.1.0.2 && < 2.5,
+ haskell-src-exts >= 1.9.6 && < 1.10,
+ containers >= 0.1.0 && < 1,
+ pretty >= 1 && < 2,
+Index: agda/src/full/Agda/Interaction/Options.hs
+===================================================================
+--- agda.orig/src/full/Agda/Interaction/Options.hs 2011-02-24 18:19:56.337595320 +0000
++++ agda/src/full/Agda/Interaction/Options.hs 2011-02-24 18:22:33.703954610 +0000
+@@ -18,7 +18,7 @@
+ ) where
+
+ import Control.Monad ( when )
+-import Control.Monad.Error ( MonadError(..) )
++import Control.Monad.Error ( MonadError(catchError) )
+ import Data.List ( isSuffixOf )
+ import System.Console.GetOpt (getOpt, usageInfo, ArgOrder(ReturnInOrder)
+ , OptDescr(..), ArgDescr(..)
+@@ -197,7 +197,7 @@
+ inputFlag f o =
+ case optInputFile o of
+ Nothing -> return $ o { optInputFile = Just f }
+- Just _ -> throwError "only one input file allowed"
++ Just _ -> fail "only one input file allowed"
+
+ versionFlag o = return $ o { optShowVersion = True }
+ helpFlag o = return $ o { optShowHelp = True }
+@@ -246,18 +246,18 @@
+ ss -> do
+ n <- readM (last ss) `catchError` \_ -> usage
+ return (init ss, n)
+- usage = throwError "argument to verbose should be on the form x.y.z:N or N"
++ usage = fail "argument to verbose should be on the form x.y.z:N or N"
+
+ terminationDepthFlag s o =
+ do k <- readM s `catchError` \_ -> usage
+ when (k < 1) $ usage -- or: turn termination checking off for 0
+ return $ o { optTerminationDepth = k-1 }
+- where usage = throwError "argument to termination-depth should be >= 1"
++ where usage = fail "argument to termination-depth should be >= 1"
+
+ integerArgument :: String -> String -> Either String Int
+ integerArgument flag s =
+ readM s `catchError` \_ ->
+- throwError $ "option '" ++ flag ++ "' requires an integer argument"
++ fail $ "option '" ++ flag ++ "' requires an integer argument"
+
+ standardOptions :: [OptDescr (Flag CommandLineOptions)]
+ standardOptions =
+@@ -344,7 +344,7 @@
+ parseOptions' argv opts fileArg = \defaults ->
+ case getOpt (ReturnInOrder fileArg) opts argv of
+ (o,_,[]) -> foldl (>>=) (return defaults) o
+- (_,_,errs) -> throwError $ concat errs
++ (_,_,errs) -> fail $ concat errs
+
+ -- | Parse the standard options.
+ parseStandardOptions :: [String] -> Either String CommandLineOptions
+@@ -361,7 +361,7 @@
+ -> Either String PragmaOptions
+ parsePragmaOptions argv opts = do
+ ps <- parseOptions' argv pragmaOptions
+- (\s _ -> throwError $ "Bad option in pragma: " ++ s)
++ (\s _ -> fail $ "Bad option in pragma: " ++ s)
+ (optPragmaOptions opts)
+ checkOpts (opts { optPragmaOptions = ps })
+ return ps
+@@ -370,8 +370,7 @@
+ parsePluginOptions :: [String] -> [OptDescr (Flag opts)] -> Flag opts
+ parsePluginOptions argv opts =
+ parseOptions' argv opts
+- (\s _ -> throwError $
+- "Internal error: Flag " ++ s ++ " passed to a plugin")
++ (\s _ -> fail $ "Internal error: Flag " ++ s ++ " passed to a plugin")
+
+ -- | The usage info message. The argument is the program name (probably
+ -- agda).
+Index: agda/src/full/Agda/Syntax/Notation.hs
+===================================================================
+--- agda.orig/src/full/Agda/Syntax/Notation.hs 2011-02-24 18:19:56.337595320 +0000
++++ agda/src/full/Agda/Syntax/Notation.hs 2011-02-24 18:22:33.703954610 +0000
+@@ -5,7 +5,6 @@
+
+ import Control.Applicative
+ import Control.Monad (when)
+-import Control.Monad.Error (throwError)
+ import Data.List
+ import Data.Maybe
+ import Data.Generics (Typeable, Data)
+@@ -66,12 +65,12 @@
+
+ -- | From notation with names to notation with indices.
+ mkNotation :: [HoleName] -> [String] -> Either String Notation
+-mkNotation _ [] = throwError "empty notation is disallowed"
++mkNotation _ [] = fail "empty notation is disallowed"
+ mkNotation holes ids = do
+ xs <- mapM mkPart ids
+- when (not (isAlternating xs)) $ throwError "syntax must alternate holes and non-holes"
+- when (not (isExprLinear xs)) $ throwError "syntax must use holes exactly once"
+- when (not (isLambdaLinear xs)) $ throwError "syntax must use binding holes exactly once"
++ when (not (isAlternating xs)) $ fail "syntax must alternate holes and non-holes"
++ when (not (isExprLinear xs)) $ fail "syntax must use holes exactly once"
++ when (not (isLambdaLinear xs)) $ fail "syntax must use binding holes exactly once"
+ return xs
+ where mkPart ident =
+ case (findIndices (\x -> ident == holeName x) holes,
+@@ -79,7 +78,7 @@
+ ([],[x]) -> return $ BindHole x
+ ([x], []) -> return $ NormalHole x
+ ([], []) -> return $ IdPart ident
+- _ -> throwError "hole names must be unique"
++ _ -> fail "hole names must be unique"
+
+ isExprLinear xs = sort [ x | NormalHole x <- xs] == [ i | (i,h) <- zip [0..] holes ]
+ isLambdaLinear xs = sort [ x | BindHole x <- xs] == [ i | (i,h) <- zip [0..] holes, isLambdaHole h ]
+Index: agda/src/full/Agda/Utils/Monad.hs
+===================================================================
+--- agda.orig/src/full/Agda/Utils/Monad.hs 2011-02-24 18:19:56.357597401 +0000
++++ agda/src/full/Agda/Utils/Monad.hs 2011-02-24 18:22:33.703954610 +0000
+@@ -1,4 +1,4 @@
+-{-# LANGUAGE FlexibleContexts, CPP #-}
++{-# LANGUAGE CPP #-}
+
+ module Agda.Utils.Monad
+ ( module Agda.Utils.Monad
+@@ -21,6 +21,36 @@
+ #include "../undefined.h"
+ import Agda.Utils.Impossible
+
++-- Instances --------------------------------------------------------------
++
++instance Applicative (Reader env) where
++ pure = return
++ (<*>) = ap
++
++instance (Error e, Monad m) => Applicative (ErrorT e m) where
++ pure = return
++ (<*>) = ap
++
++instance Monad m => Applicative (ReaderT env m) where
++ pure = return
++ (<*>) = ap
++
++instance Monad m => Applicative (StateT s m) where
++ pure = return
++ (<*>) = ap
++
++instance Monad m => Applicative (SS.StateT s m) where
++ pure = return
++ (<*>) = ap
++
++instance (Monoid o, Monad m) => Applicative (WriterT o m) where
++ pure = return
++ (<*>) = ap
++
++instance Applicative (State s) where
++ pure = return
++ (<*>) = ap
++
+ -- Monads -----------------------------------------------------------------
+
+ infixl 8 <.>
+@@ -108,8 +138,7 @@
+
+ -- Read -------------------------------------------------------------------
+
+-readM :: (Error e, MonadError e m, Read a) => String -> m a
++readM :: (Monad m, Read a) => String -> m a
+ readM s = case reads s of
+ [(x,"")] -> return x
+- _ ->
+- throwError $ strMsg $ "readM: parse error string " ++ s
++ _ -> fail $ "readM: parse error string " ++ s
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..7b4dd62
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+relax-build-dependencies
--
Packaging for Agda
More information about the Pkg-haskell-commits
mailing list