~ubuntu-branches/ubuntu/trusty/agda/trusty

« back to all changes in this revision

Viewing changes to debian/patches/relax-build-dependencies

  • Committer: Bazaar Package Importer
  • Author(s): Iain Lane
  • Date: 2011-05-19 13:43:17 UTC
  • mfrom: (7.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20110519134317-xwh8qc1cm136kkos
Tags: 2.2.10-1
* [60c4b8a] Imported Upstream version 2.2.10
* [81c6857] Add haskell-src-exts BD
* [d0ce959] Add QuickCheck BDs
* [5c875b0] Update short descriptions to reflect best practice
* [705223c] d/copyright: Update copyright years
* [ee8a4bc] GHC6 → GHC, for GHC 7 transition
* [12d4e49] Standards-Version bump to 3.9.2, no changes required
* [9244cc3] Add 'agda' meta package
* [c28c44c] Relax BD on src-exts
* [86be090] Backport upstream patch to add syb-0.3 compatibility
* [828c999] Lexer: Compatibility with the new GHC
* [db55ca5] Clean up some autogenerated files

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Description: Compile with libraries in Debian
2
 
Author: Nils Anders Danielsson <nils.anders.danielsson@gmail.com>
3
 
Origin: upstream
4
 
Forwarded: not-needed
5
 
 
6
 
Thu Feb 24 10:33:21 GMT 2011  Nils Anders Danielsson <nils.anders.danielsson@gmail.com>
7
 
  * Made Agda build using GHC 6.12.3, mtl 1.1.0.2 and QuickCheck 2.1.0.3.
8
 
Index: agda/Agda.cabal
9
 
===================================================================
10
 
--- agda.orig/Agda.cabal        2011-02-24 18:19:56.317593241 +0000
11
 
+++ agda/Agda.cabal     2011-02-24 18:22:33.703954610 +0000
12
 
@@ -34,7 +34,7 @@
13
 
   Note also that this library does not follow the package versioning
14
 
   policy, because the library is only intended to be used by the Emacs
15
 
   mode and the Agda-executable package.
16
 
-tested-with:        GHC == 6.12.1, GHC == 6.12.3, GHC == 7.0.1
17
 
+tested-with:        GHC == 6.12.3
18
 
 extra-source-files: src/full/Agda/undefined.h
19
 
                     README
20
 
                     doc/release-notes/*.txt
21
 
@@ -69,14 +69,14 @@
22
 
 library
23
 
   hs-source-dirs:   src/full
24
 
   if flag(use-locale)
25
 
-    build-depends:  base >= 4.2 && < 4.4
26
 
+    build-depends:  base >= 4.2 && < 4.3
27
 
   else
28
 
     build-depends:  base == 4.1.*,
29
 
                     utf8-string == 0.3.*
30
 
   if flag(epic)
31
 
     build-depends:  epic >= 0.1.7 && < 0.2
32
 
-  build-depends:    mtl == 2.0.*,
33
 
-                    QuickCheck >= 2.3 && < 2.5,
34
 
+  build-depends:    mtl >= 1.1 && < 2,
35
 
+                    QuickCheck >= 2.1.0.2 && < 2.5,
36
 
                     haskell-src-exts >= 1.9.6 && < 1.10,
37
 
                     containers >= 0.1.0 && < 1,
38
 
                     pretty >= 1 && < 2,
39
 
Index: agda/src/full/Agda/Interaction/Options.hs
40
 
===================================================================
41
 
--- agda.orig/src/full/Agda/Interaction/Options.hs      2011-02-24 18:19:56.337595320 +0000
42
 
+++ agda/src/full/Agda/Interaction/Options.hs   2011-02-24 18:22:33.703954610 +0000
43
 
@@ -18,7 +18,7 @@
44
 
     ) where
45
 
 
46
 
 import Control.Monad            ( when )
47
 
-import Control.Monad.Error     ( MonadError(..) )
48
 
+import Control.Monad.Error     ( MonadError(catchError) )
49
 
 import Data.List               ( isSuffixOf )
50
 
 import System.Console.GetOpt   (getOpt, usageInfo, ArgOrder(ReturnInOrder)
51
 
                                , OptDescr(..), ArgDescr(..)
52
 
@@ -197,7 +197,7 @@
53
 
 inputFlag f o =
54
 
     case optInputFile o of
55
 
        Nothing  -> return $ o { optInputFile = Just f }
56
 
-       Just _   -> throwError "only one input file allowed"
57
 
+       Just _   -> fail "only one input file allowed"
58
 
 
59
 
 versionFlag                  o = return $ o { optShowVersion               = True  }
60
 
 helpFlag                     o = return $ o { optShowHelp                  = True  }
61
 
@@ -246,18 +246,18 @@
62
 
       ss  -> do
63
 
         n <- readM (last ss) `catchError` \_ -> usage
64
 
         return (init ss, n)
65
 
-    usage = throwError "argument to verbose should be on the form x.y.z:N or N"
66
 
+    usage = fail "argument to verbose should be on the form x.y.z:N or N"
67
 
 
68
 
 terminationDepthFlag s o =
69
 
     do k <- readM s `catchError` \_ -> usage
70
 
        when (k < 1) $ usage -- or: turn termination checking off for 0
71
 
        return $ o { optTerminationDepth = k-1 }
72
 
-    where usage = throwError "argument to termination-depth should be >= 1"
73
 
+    where usage = fail "argument to termination-depth should be >= 1"
74
 
 
75
 
 integerArgument :: String -> String -> Either String Int
76
 
 integerArgument flag s =
77
 
     readM s `catchError` \_ ->
78
 
-       throwError $ "option '" ++ flag ++ "' requires an integer argument"
79
 
+       fail $ "option '" ++ flag ++ "' requires an integer argument"
80
 
 
81
 
 standardOptions :: [OptDescr (Flag CommandLineOptions)]
82
 
 standardOptions =
83
 
@@ -344,7 +344,7 @@
84
 
 parseOptions' argv opts fileArg = \defaults ->
85
 
     case getOpt (ReturnInOrder fileArg) opts argv of
86
 
        (o,_,[])    -> foldl (>>=) (return defaults) o
87
 
-       (_,_,errs)  -> throwError $ concat errs
88
 
+       (_,_,errs)  -> fail $ concat errs
89
 
 
90
 
 -- | Parse the standard options.
91
 
 parseStandardOptions :: [String] -> Either String CommandLineOptions
92
 
@@ -361,7 +361,7 @@
93
 
   -> Either String PragmaOptions
94
 
 parsePragmaOptions argv opts = do
95
 
   ps <- parseOptions' argv pragmaOptions
96
 
-          (\s _ -> throwError $ "Bad option in pragma: " ++ s)
97
 
+          (\s _ -> fail $ "Bad option in pragma: " ++ s)
98
 
           (optPragmaOptions opts)
99
 
   checkOpts (opts { optPragmaOptions = ps })
100
 
   return ps
101
 
@@ -370,8 +370,7 @@
102
 
 parsePluginOptions :: [String] -> [OptDescr (Flag opts)] -> Flag opts
103
 
 parsePluginOptions argv opts =
104
 
   parseOptions' argv opts
105
 
-    (\s _ -> throwError $
106
 
-               "Internal error: Flag " ++ s ++ " passed to a plugin")
107
 
+    (\s _ -> fail $ "Internal error: Flag " ++ s ++ " passed to a plugin")
108
 
 
109
 
 -- | The usage info message. The argument is the program name (probably
110
 
 --   agda).
111
 
Index: agda/src/full/Agda/Syntax/Notation.hs
112
 
===================================================================
113
 
--- agda.orig/src/full/Agda/Syntax/Notation.hs  2011-02-24 18:19:56.337595320 +0000
114
 
+++ agda/src/full/Agda/Syntax/Notation.hs       2011-02-24 18:22:33.703954610 +0000
115
 
@@ -5,7 +5,6 @@
116
 
 
117
 
 import Control.Applicative
118
 
 import Control.Monad (when)
119
 
-import Control.Monad.Error (throwError)
120
 
 import Data.List
121
 
 import Data.Maybe
122
 
 import Data.Generics (Typeable, Data)
123
 
@@ -66,12 +65,12 @@
124
 
 
125
 
 -- | From notation with names to notation with indices.
126
 
 mkNotation :: [HoleName] -> [String] -> Either String Notation
127
 
-mkNotation _ [] = throwError "empty notation is disallowed"
128
 
+mkNotation _ [] = fail "empty notation is disallowed"
129
 
 mkNotation holes ids = do
130
 
   xs <- mapM mkPart ids
131
 
-  when (not (isAlternating xs)) $ throwError "syntax must alternate holes and non-holes"
132
 
-  when (not (isExprLinear xs)) $ throwError "syntax must use holes exactly once"
133
 
-  when (not (isLambdaLinear xs)) $ throwError "syntax must use binding holes exactly once"
134
 
+  when (not (isAlternating xs)) $ fail "syntax must alternate holes and non-holes"
135
 
+  when (not (isExprLinear xs)) $ fail "syntax must use holes exactly once"
136
 
+  when (not (isLambdaLinear xs)) $ fail "syntax must use binding holes exactly once"
137
 
   return xs
138
 
     where mkPart ident =
139
 
              case (findIndices (\x -> ident == holeName x) holes,
140
 
@@ -79,7 +78,7 @@
141
 
                            ([],[x])   -> return $ BindHole x
142
 
                            ([x], [])  -> return $ NormalHole x
143
 
                            ([], []) -> return $ IdPart ident
144
 
-                           _ -> throwError "hole names must be unique"
145
 
+                           _ -> fail "hole names must be unique"
146
 
 
147
 
           isExprLinear   xs = sort [ x | NormalHole x <- xs] == [ i | (i,h) <- zip [0..] holes ]
148
 
           isLambdaLinear xs = sort [ x | BindHole   x <- xs] == [ i | (i,h) <- zip [0..] holes, isLambdaHole h ]
149
 
Index: agda/src/full/Agda/Utils/Monad.hs
150
 
===================================================================
151
 
--- agda.orig/src/full/Agda/Utils/Monad.hs      2011-02-24 18:19:56.357597401 +0000
152
 
+++ agda/src/full/Agda/Utils/Monad.hs   2011-02-24 18:22:33.703954610 +0000
153
 
@@ -1,4 +1,4 @@
154
 
-{-# LANGUAGE FlexibleContexts, CPP #-}
155
 
+{-# LANGUAGE CPP #-}
156
 
 
157
 
 module Agda.Utils.Monad
158
 
     ( module Agda.Utils.Monad
159
 
@@ -21,6 +21,36 @@
160
 
 #include "../undefined.h"
161
 
 import Agda.Utils.Impossible
162
 
 
163
 
+-- Instances --------------------------------------------------------------
164
 
+
165
 
+instance Applicative (Reader env) where
166
 
+  pure  = return
167
 
+  (<*>) = ap
168
 
+
169
 
+instance (Error e, Monad m) => Applicative (ErrorT e m) where
170
 
+  pure  = return
171
 
+  (<*>) = ap
172
 
+
173
 
+instance Monad m => Applicative (ReaderT env m) where
174
 
+  pure  = return
175
 
+  (<*>) = ap
176
 
+
177
 
+instance Monad m => Applicative (StateT s m) where
178
 
+  pure  = return
179
 
+  (<*>) = ap
180
 
+
181
 
+instance Monad m => Applicative (SS.StateT s m) where
182
 
+  pure  = return
183
 
+  (<*>) = ap
184
 
+
185
 
+instance (Monoid o, Monad m) => Applicative (WriterT o m) where
186
 
+  pure = return
187
 
+  (<*>)        = ap
188
 
+
189
 
+instance Applicative (State s) where
190
 
+  pure = return
191
 
+  (<*>)        = ap
192
 
+
193
 
 -- Monads -----------------------------------------------------------------
194
 
 
195
 
 infixl 8 <.>
196
 
@@ -108,8 +138,7 @@
197
 
 
198
 
 -- Read -------------------------------------------------------------------
199
 
 
200
 
-readM :: (Error e, MonadError e m, Read a) => String -> m a
201
 
+readM :: (Monad m, Read a) => String -> m a
202
 
 readM s = case reads s of
203
 
            [(x,"")]    -> return x
204
 
-           _           ->
205
 
-              throwError $ strMsg $ "readM: parse error string " ++ s
206
 
+           _           -> fail $ "readM: parse error string " ++ s