[Pkg-haskell-commits] [SCM] Packaging for Agda branch, master, updated. debian/2.2.10-3-7-ga654242

Iain Lane laney at debian.org
Sat Sep 3 22:29:41 UTC 2011


The following commit has been merged in the master branch:
commit f228ca02a77f9791414f7d203e31e065b9ee2e40
Author: Iain Lane <laney at debian.org>
Date:   Sat Sep 3 22:02:57 2011 +0100

    Add an alexGetByte function for alex-3.0 compatibility

diff --git a/debian/control b/debian/control
index c66b1ad..9d993e1 100644
--- a/debian/control
+++ b/debian/control
@@ -28,7 +28,6 @@ Build-Depends: debhelper (>= 7.0),
                happy (>= 1.15),
                happy (<< 2),
                alex (>= 2.0.1),
-               alex (<< 3),
                libncurses5-dev
 Build-Depends-Indep: ghc-doc,
                      libghc-binary-doc (>= 0.4.4),
diff --git a/debian/patches/0002-Compatibility-with-src-exts-1.11.patch b/debian/patches/0002-Compatibility-with-src-exts-1.11.patch
index 33da6f7..ca28c24 100644
--- a/debian/patches/0002-Compatibility-with-src-exts-1.11.patch
+++ b/debian/patches/0002-Compatibility-with-src-exts-1.11.patch
@@ -6,11 +6,11 @@ Subject: Compatibility with src-exts 1.11
  Agda.cabal |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
 
-Index: agda/Agda.cabal
-===================================================================
---- agda.orig/Agda.cabal	2011-06-08 09:30:47.000000000 +0200
-+++ agda/Agda.cabal	2011-06-17 10:30:29.000000000 +0200
-@@ -77,7 +77,7 @@
+diff --git a/Agda.cabal b/Agda.cabal
+index 5675dbe..f6a347b 100644
+--- a/Agda.cabal
++++ b/Agda.cabal
+@@ -77,7 +77,7 @@ library
      build-depends:  epic >= 0.1.7 && < 0.2
    build-depends:    mtl == 2.0.*,
                      QuickCheck >= 2.3 && < 2.5,
@@ -19,3 +19,4 @@ Index: agda/Agda.cabal
                      containers >= 0.1.0 && < 1,
                      pretty >= 1 && < 2,
                      directory >= 1.0 && < 1.2,
+-- 
diff --git a/debian/patches/0003-Compatibility-with-syb-0.4.patch b/debian/patches/0003-Compatibility-with-syb-0.4.patch
index e940108..32e8a36 100644
--- a/debian/patches/0003-Compatibility-with-syb-0.4.patch
+++ b/debian/patches/0003-Compatibility-with-syb-0.4.patch
@@ -9,7 +9,7 @@ Subject: Compatibility with syb 0.4
  3 files changed, 14 insertions(+), 4 deletions(-)
 
 diff --git a/Agda.cabal b/Agda.cabal
-index 443fa0f..f3cb0b3 100644
+index f6a347b..3d65b4c 100644
 --- a/Agda.cabal
 +++ b/Agda.cabal
 @@ -90,7 +90,7 @@ library
diff --git a/debian/patches/0004-Add-an-alexGetByte-function-for-alex-3.0-compatibili.patch b/debian/patches/0004-Add-an-alexGetByte-function-for-alex-3.0-compatibili.patch
new file mode 100644
index 0000000..46bf152
--- /dev/null
+++ b/debian/patches/0004-Add-an-alexGetByte-function-for-alex-3.0-compatibili.patch
@@ -0,0 +1,61 @@
+From: Iain Lane <laney at debian.org>
+Date: Sat, 3 Sep 2011 22:01:39 +0100
+Subject: Add an alexGetByte function for alex-3.0 compatibility
+
+---
+ Agda.cabal                          |    2 +-
+ src/full/Agda/Syntax/Parser/Alex.hs |   13 +++++++++++++
+ 2 files changed, 14 insertions(+), 1 deletions(-)
+
+diff --git a/Agda.cabal b/Agda.cabal
+index 3d65b4c..a4fdc37 100644
+--- a/Agda.cabal
++++ b/Agda.cabal
+@@ -92,7 +92,7 @@ library
+                     xhtml == 3000.2.*,
+                     syb >= 0.1 && < 0.4
+   build-tools:      happy >= 1.15 && < 2,
+-                    alex >= 2.0.1 && < 3
++                    alex >= 2.0.1
+   extensions:       CPP
+   exposed-modules:  Agda.Main
+                     Agda.ImpossibleTest
+diff --git a/src/full/Agda/Syntax/Parser/Alex.hs b/src/full/Agda/Syntax/Parser/Alex.hs
+index 603944b..b53ecad 100644
+--- a/src/full/Agda/Syntax/Parser/Alex.hs
++++ b/src/full/Agda/Syntax/Parser/Alex.hs
+@@ -6,6 +6,7 @@ module Agda.Syntax.Parser.Alex
+     ( -- * Alex requirements
+       AlexInput(..)
+     , alexInputPrevChar
++    , alexGetByte
+     , alexGetChar
+       -- * Lex actions
+     , LexAction, LexPredicate
+@@ -17,6 +18,8 @@ module Agda.Syntax.Parser.Alex
+     where
+ 
+ import Control.Monad.State
++import Data.Word (Word8)
++import Data.Char (ord)
+ 
+ import Agda.Syntax.Position
+ import Agda.Syntax.Parser.Monad
+@@ -35,6 +38,16 @@ data AlexInput = AlexInput
+ alexInputPrevChar :: AlexInput -> Char
+ alexInputPrevChar = lexPrevChar
+ 
++-- for alex-3
++alexGetByte :: AlexInput -> Maybe (Word8, AlexInput)
++alexGetByte (AlexInput { lexInput = []  }) = Nothing
++alexGetByte (AlexInput { lexInput = c:s, lexPos = p }) =
++    Just (fromIntegral $ ord c, AlexInput
++		 { lexInput	= s
++		 , lexPos	= movePos p c
++		 , lexPrevChar	= c
++		 }
++	 )
+ -- | Lex a character. No surprises.
+ alexGetChar :: AlexInput -> Maybe (Char, AlexInput)
+ alexGetChar (AlexInput { lexInput = []  }) = Nothing
+-- 
diff --git a/debian/patches/series b/debian/patches/series
index e4432c1..2857bfa 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 0001-Compatibility-with-Alex-2.3.5-and-GHC-7.0.3.patch
 0002-Compatibility-with-src-exts-1.11.patch
 0003-Compatibility-with-syb-0.4.patch
+0004-Add-an-alexGetByte-function-for-alex-3.0-compatibili.patch

-- 
Packaging for Agda



More information about the Pkg-haskell-commits mailing list