[Pkg-haskell-commits] darcs: haskell-haddock: Patch to build with alex 3. closes: #639038.

clint at debian.org clint at debian.org
Mon Sep 5 19:49:29 UTC 2011


Mon Sep  5 19:48:43 UTC 2011  clint at debian.org
  * Patch to build with alex 3.  closes: #639038.
  Ignore-this: 3e1487af8339fd9bd4cbf1ca62b02325

    M ./changelog +7
    M ./control -1 +1
    A ./patches/alex3-hack.patch
    M ./patches/series +1

Mon Sep  5 19:48:43 UTC 2011  clint at debian.org
  * Patch to build with alex 3.  closes: #639038.
  Ignore-this: 3e1487af8339fd9bd4cbf1ca62b02325
diff -rN -u old-haskell-haddock//changelog new-haskell-haddock//changelog
--- old-haskell-haddock//changelog	2011-09-05 19:49:29.318055526 +0000
+++ new-haskell-haddock//changelog	2011-09-05 19:49:29.322056390 +0000
@@ -1,3 +1,10 @@
+haskell-haddock (2.9.2-2) unstable; urgency=low
+
+  * Apply 11-Aug hack from Simon Marlow to build with alex 3.
+    closes: #639038.
+
+ -- Clint Adams <clint at debian.org>  Mon, 05 Sep 2011 15:38:00 -0400
+
 haskell-haddock (2.9.2-1) unstable; urgency=low
 
   * New upstream release specified by Haskell platform 2011.2.0.1
diff -rN -u old-haskell-haddock//control new-haskell-haddock//control
--- old-haskell-haddock//control	2011-09-05 19:49:29.318055526 +0000
+++ new-haskell-haddock//control	2011-09-05 19:49:29.322056390 +0000
@@ -2,7 +2,7 @@
 Section: haskell
 Priority: extra
 Maintainer: Debian Haskell Group <pkg-haskell-maintainers at lists.alioth.debian.org>
-Uploaders: Joachim Breitner <nomeata at debian.org>
+Uploaders: Joachim Breitner <nomeata at debian.org>, Clint Adams <clint at debian.org>
 Build-Depends: debhelper (>= 7)
   , cdbs
   , haskell-devscripts (>= 0.7)
diff -rN -u old-haskell-haddock//patches/alex3-hack.patch new-haskell-haddock//patches/alex3-hack.patch
--- old-haskell-haddock//patches/alex3-hack.patch	1970-01-01 00:00:00.000000000 +0000
+++ new-haskell-haddock//patches/alex3-hack.patch	2011-09-05 19:49:29.326056303 +0000
@@ -0,0 +1,57 @@
+src/Haddock/Lex.x | 34 ++++++++++++++++++++++++++++++++--
+1 files changed, 32 insertions(+), 2 deletions(-)
+
+--- a/src/Haddock/Lex.x
++++ b/src/Haddock/Lex.x
+@@ -30,12 +30,11 @@
+ import DynFlags
+ 
+ import Data.Char
++import Data.Word (Word8)
+ import Numeric
+ import System.IO.Unsafe
+ }
+ 
+-%wrapper "posn"
+-
+ $ws    = $white # \n
+ $digit = [0-9]
+ $hexdigit = [0-9a-fA-F]
+@@ -139,6 +138,37 @@
+ -- -----------------------------------------------------------------------------
+ -- Alex support stuff
+ 
++-- XXX: copied the posn wrapper code from Alex to make this lexer work
++-- with both Alex 2.x and Alex 3.x. However, we are not using the
++-- Unicode/UTF-8 support in Alex 3.x, and Unicode documentation will
++-- probably get mangled.
++
++type AlexInput = (AlexPosn, -- current position,
++ Char, -- previous char
++ String) -- current input string
++
++alexInputPrevChar :: AlexInput -> Char
++alexInputPrevChar (p,c,s) = c
++
++alexGetByte :: AlexInput -> Maybe (Word8,AlexInput)
++alexGetByte (p,c,[]) = Nothing
++alexGetByte (p,_,(c:s)) = let p' = alexMove p c
++ in p' `seq` Just (fromIntegral (ord c), (p', c, s))
++
++-- for compat with Alex 2.x:
++alexGetChar :: AlexInput -> Maybe (Char,AlexInput)
++alexGetChar i = case alexGetByte i of
++ Nothing -> Nothing
++ Just (b,i') -> Just (chr (fromIntegral b), i')
++
++alexMove :: AlexPosn -> Char -> AlexPosn
++alexMove (AlexPn a l c) '\t' = AlexPn (a+1) l (((c+7) `div` 8)*8+1)
++alexMove (AlexPn a l c) '\n' = AlexPn (a+1) (l+1) 1
++alexMove (AlexPn a l c) _ = AlexPn (a+1) l (c+1)
++
++data AlexPosn = AlexPn !Int !Int !Int
++ deriving (Eq,Show)
++
+ type StartCode = Int
+ type Action = AlexPosn -> String -> StartCode -> (StartCode -> [LToken]) -> DynFlags -> [LToken]
+ 
diff -rN -u old-haskell-haddock//patches/series new-haskell-haddock//patches/series
--- old-haskell-haddock//patches/series	2011-09-05 19:49:29.318055526 +0000
+++ new-haskell-haddock//patches/series	2011-09-05 19:49:29.326056303 +0000
@@ -1 +1,2 @@
 build_without_ghci.patch
+alex3-hack.patch





More information about the Pkg-haskell-commits mailing list