[Pkg-haskell-commits] darcs: helium: Use 3.0 (quilt) source format.

Marco Túlio Gontijo e Silva marcot at debian.org
Mon Mar 15 01:45:27 UTC 2010


Sat Mar 13 22:12:51 UTC 2010  Marco T[_\c3_][_\ba_]lio Gontijo e Silva <marcot at debian.org>
  * Use 3.0 (quilt) source format.
  Ignore-this: 3eb627814490621e8c5556392e1223a3

     ./patches/00list -> ./patches/series
     ./patches/01_fhs-and-destdir.dpatch -> ./patches/01_fhs-and-destdir
     ./patches/02_typed-punning.dpatch -> ./patches/02_typed-punning
     ./patches/03_add-readline-support.dpatch -> ./patches/03_add-readline-support
     ./patches/04_fixes-for-ghc6.dpatch -> ./patches/04_fixes-for-ghc6
     ./patches/05_fixes-for-64bit.dpatch -> ./patches/05_fixes-for-64bit
     ./patches/06_no-strip.dpatch -> ./patches/06_no-strip
     ./patches/10_autoconf.dpatch -> ./patches/10_autoconf
    M ./changelog +6
    M ./control -1 +1
    M ./patches/01_fhs-and-destdir -7 +2
    M ./patches/02_typed-punning -7 +2
    M ./patches/03_add-readline-support -7 +2
    M ./patches/04_fixes-for-ghc6 -7 +2
    M ./patches/05_fixes-for-64bit -7 +2
    M ./patches/06_no-strip -7 +2
    M ./patches/10_autoconf -7 +2
    M ./rules -5 +2
    A ./source/
    A ./source/format

Sat Mar 13 22:12:51 UTC 2010  Marco Túlio Gontijo e Silva <marcot at debian.org>
  * Use 3.0 (quilt) source format.
  Ignore-this: 3eb627814490621e8c5556392e1223a3
diff -rN -u old-helium/changelog new-helium/changelog
--- old-helium/changelog	2010-03-15 01:45:27.013708499 +0000
+++ new-helium/changelog	2010-03-15 01:45:27.065711345 +0000
@@ -1,3 +1,9 @@
+helium (1.6-5) UNRELEASED; urgency=low
+
+  * Use 3.0 (quilt) source format.
+
+ -- Marco Túlio Gontijo e Silva <marcot at debian.org>  Sat, 06 Mar 2010 09:58:24 -0300
+
 helium (1.6-4.1) unstable; urgency=low
 
   * Non-maintainer upload.
diff -rN -u old-helium/control new-helium/control
--- old-helium/control	2010-03-15 01:45:27.013708499 +0000
+++ new-helium/control	2010-03-15 01:45:27.065711345 +0000
@@ -2,7 +2,7 @@
 Section: devel
 Priority: optional
 Maintainer: Arjan Oosting <arjan at debian.org>
-Build-Depends: autotools-dev, debhelper (>= 5), dpatch, 
+Build-Depends: autotools-dev, debhelper (>= 5),
  ghc6 (>= 6.8.2), haddock, libghc6-mtl-dev, libghc6-parsec-dev, uuagc, libghc6-editline-dev
 Standards-Version: 3.7.3
 Vcs-Svn: svn://svn.debian.org/svn/pkg-haskell/packages/helium
diff -rN -u old-helium/patches/00list new-helium/patches/00list
--- old-helium/patches/00list	2010-03-15 01:45:27.001707842 +0000
+++ new-helium/patches/00list	1970-01-01 00:00:00.000000000 +0000
@@ -1,7 +0,0 @@
-01_fhs-and-destdir
-02_typed-punning
-03_add-readline-support
-04_fixes-for-ghc6
-05_fixes-for-64bit
-06_no-strip
-10_autoconf
diff -rN -u old-helium/patches/01_fhs-and-destdir new-helium/patches/01_fhs-and-destdir
--- old-helium/patches/01_fhs-and-destdir	1970-01-01 00:00:00.000000000 +0000
+++ new-helium/patches/01_fhs-and-destdir	2010-03-15 01:45:27.045710250 +0000
@@ -0,0 +1,18 @@
+# Description: FHS and destdir
+# Author: Arjan Oosting <arjanoosting at home.nl>
+diff -urNad helium-1.6~/helium/src/Makefile.in helium-1.6/helium/src/Makefile.in
+--- helium-1.6~/helium/src/Makefile.in	2006-09-15 06:03:02.000000000 +0200
++++ helium-1.6/helium/src/Makefile.in	2006-09-15 06:05:29.000000000 +0200
+@@ -28,9 +28,9 @@
+ 
+ prefix      = @prefix@
+ exec_prefix = @exec_prefix@
+-bindir      = @bindir@
+-libdir      = @prefix@/helium/lib
+-demodir     = @prefix@/helium/demo
++bindir      = $(DESTDIR)@bindir@
++libdir      = $(DESTDIR)@prefix@/lib/helium/lib
++demodir     = $(DESTDIR)@prefix@/share/doc/helium/demo
+ 
+ status :
+ 	@echo "*******************************************************************"
diff -rN -u old-helium/patches/01_fhs-and-destdir.dpatch new-helium/patches/01_fhs-and-destdir.dpatch
--- old-helium/patches/01_fhs-and-destdir.dpatch	2010-03-15 01:45:27.013708499 +0000
+++ new-helium/patches/01_fhs-and-destdir.dpatch	1970-01-01 00:00:00.000000000 +0000
@@ -1,23 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 01_fhs-and-destdir.dpatch by Arjan Oosting <arjanoosting at home.nl>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
- at DPATCH@
-diff -urNad helium-1.6~/helium/src/Makefile.in helium-1.6/helium/src/Makefile.in
---- helium-1.6~/helium/src/Makefile.in	2006-09-15 06:03:02.000000000 +0200
-+++ helium-1.6/helium/src/Makefile.in	2006-09-15 06:05:29.000000000 +0200
-@@ -28,9 +28,9 @@
- 
- prefix      = @prefix@
- exec_prefix = @exec_prefix@
--bindir      = @bindir@
--libdir      = @prefix@/helium/lib
--demodir     = @prefix@/helium/demo
-+bindir      = $(DESTDIR)@bindir@
-+libdir      = $(DESTDIR)@prefix@/lib/helium/lib
-+demodir     = $(DESTDIR)@prefix@/share/doc/helium/demo
- 
- status :
- 	@echo "*******************************************************************"
diff -rN -u old-helium/patches/02_typed-punning new-helium/patches/02_typed-punning
--- old-helium/patches/02_typed-punning	1970-01-01 00:00:00.000000000 +0000
+++ new-helium/patches/02_typed-punning	2010-03-15 01:45:27.045710250 +0000
@@ -0,0 +1,21 @@
+# Description: Typed punning
+# Author: Arjan Oosting <arjanoosting at home.nl>
+diff -urNad helium-1.6~/lvm/src/configure helium-1.6/lvm/src/configure
+--- helium-1.6~/lvm/src/configure	2006-02-05 17:35:50.000000000 +0100
++++ helium-1.6/lvm/src/configure	2006-09-15 06:25:03.000000000 +0200
+@@ -662,7 +662,7 @@
+      echo "CONFIGPATH=../config" >> makefile;;
+ esac
+ 
+-echo "CCOPTS=$cccompopts -I\$(CONFIGPATH)" >> makefile
++echo "CCOPTS=$cccompopts -fno-strict-aliasing -I\$(CONFIGPATH)" >> makefile
+  
+ rm -f tst$exe hasgot.c *.obj
+ 
+@@ -694,4 +694,4 @@
+ echo "        linker used............... $link"
+ echo "        options for linking....... $cclinkopts"
+ echo
+-echo
+\ No newline at end of file
++echo
diff -rN -u old-helium/patches/02_typed-punning.dpatch new-helium/patches/02_typed-punning.dpatch
--- old-helium/patches/02_typed-punning.dpatch	2010-03-15 01:45:27.009708280 +0000
+++ new-helium/patches/02_typed-punning.dpatch	1970-01-01 00:00:00.000000000 +0000
@@ -1,26 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 02_typed-punning.dpatch by Arjan Oosting <arjanoosting at home.nl>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
- at DPATCH@
-diff -urNad helium-1.6~/lvm/src/configure helium-1.6/lvm/src/configure
---- helium-1.6~/lvm/src/configure	2006-02-05 17:35:50.000000000 +0100
-+++ helium-1.6/lvm/src/configure	2006-09-15 06:25:03.000000000 +0200
-@@ -662,7 +662,7 @@
-      echo "CONFIGPATH=../config" >> makefile;;
- esac
- 
--echo "CCOPTS=$cccompopts -I\$(CONFIGPATH)" >> makefile
-+echo "CCOPTS=$cccompopts -fno-strict-aliasing -I\$(CONFIGPATH)" >> makefile
-  
- rm -f tst$exe hasgot.c *.obj
- 
-@@ -694,4 +694,4 @@
- echo "        linker used............... $link"
- echo "        options for linking....... $cclinkopts"
- echo
--echo
-\ No newline at end of file
-+echo
diff -rN -u old-helium/patches/03_add-readline-support new-helium/patches/03_add-readline-support
--- old-helium/patches/03_add-readline-support	1970-01-01 00:00:00.000000000 +0000
+++ new-helium/patches/03_add-readline-support	2010-03-15 01:45:27.045710250 +0000
@@ -0,0 +1,72 @@
+# Description: Add readline support
+# Author: Arjan Oosting <arjanoosting at home.nl>
+diff -urNad helium-1.6~/helium/src/Makefile.in helium-1.6/helium/src/Makefile.in
+--- helium-1.6~/helium/src/Makefile.in	2006-09-15 15:06:31.000000000 +0200
++++ helium-1.6/helium/src/Makefile.in	2006-09-15 15:06:32.000000000 +0200
+@@ -48,7 +48,7 @@
+ PACKAGENET = 
+ endif
+ HC_OPTS = -static -fglasgow-exts -fallow-undecidable-instances -fallow-overlapping-instances \
+-		$(PACKAGENET) -package lang -package text -i$(IFACES) $(EXTRA_HC_OPTS)
++		$(PACKAGENET) -package lang -package text -package editline -i$(IFACES) $(EXTRA_HC_OPTS)
+ 
+ AG      = @WithAG@
+ AG_OPTS = -mscfr
+diff -urNad helium-1.6~/helium/src/texthint/Main.hs helium-1.6/helium/src/texthint/Main.hs
+--- helium-1.6~/helium/src/texthint/Main.hs	2006-09-15 15:06:18.000000000 +0200
++++ helium-1.6/helium/src/texthint/Main.hs	2006-09-15 15:07:44.000000000 +0200
+@@ -15,6 +15,7 @@
+ import Monad(when)
+ import IO(stdout, hFlush)
+ import System(system, getEnv, getArgs, exitWith, ExitCode(..))  
++import qualified System.Console.Editline.Readline as RL
+ import OSSpecific(slash)
+ import Directory
+
+@@ -75,8 +76,11 @@
+         else
+             return initialState
+             
+-    -- Enter read-eval-print loop            
++    -- Initialize editline
++    RL.initialize
++
++    -- Enter read-eval-print loop 
+     loop stateAfterLoad
+     
+     return ()
+
+@@ -89,21 +89,24 @@
+ 
+ loop :: State -> IO State
+ loop state = do
+-    putStr (prompt state)
+-    hFlush stdout
+-    command' <- getLine
+-    let command = trim command'
++    command' <- RL.readline (prompt state)
++    let command = fmap trim command'
+     newState <- case command of
+-        (':':cmd:rest) -> 
++        (Just (':':cmd:rest)) -> do
++            RL.addHistory (':':cmd:rest)
+             processCommand (toLower cmd) (trim rest) state
+-        (':':_) -> do
++        (Just (':':_)) -> do
+             putStrLn "Expecting command after colon. Type :? for help"
+             return state
+-        expression -> do
++        (Just expression) -> do
+             if null expression 
+                 then return ()
+-                else processExpression expression state
++                else do
++                    RL.addHistory expression
++                    processExpression expression state
+             return state
++        (Nothing) -> do
++            do return state
+     loop newState
+   where
+     prompt :: State -> String
+
diff -rN -u old-helium/patches/03_add-readline-support.dpatch new-helium/patches/03_add-readline-support.dpatch
--- old-helium/patches/03_add-readline-support.dpatch	2010-03-15 01:45:27.009708280 +0000
+++ new-helium/patches/03_add-readline-support.dpatch	1970-01-01 00:00:00.000000000 +0000
@@ -1,77 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 03_add-readline-support.dpatch by Arjan Oosting <arjanoosting at home.nl>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
- at DPATCH@
-diff -urNad helium-1.6~/helium/src/Makefile.in helium-1.6/helium/src/Makefile.in
---- helium-1.6~/helium/src/Makefile.in	2006-09-15 15:06:31.000000000 +0200
-+++ helium-1.6/helium/src/Makefile.in	2006-09-15 15:06:32.000000000 +0200
-@@ -48,7 +48,7 @@
- PACKAGENET = 
- endif
- HC_OPTS = -static -fglasgow-exts -fallow-undecidable-instances -fallow-overlapping-instances \
--		$(PACKAGENET) -package lang -package text -i$(IFACES) $(EXTRA_HC_OPTS)
-+		$(PACKAGENET) -package lang -package text -package editline -i$(IFACES) $(EXTRA_HC_OPTS)
- 
- AG      = @WithAG@
- AG_OPTS = -mscfr
-diff -urNad helium-1.6~/helium/src/texthint/Main.hs helium-1.6/helium/src/texthint/Main.hs
---- helium-1.6~/helium/src/texthint/Main.hs	2006-09-15 15:06:18.000000000 +0200
-+++ helium-1.6/helium/src/texthint/Main.hs	2006-09-15 15:07:44.000000000 +0200
-@@ -15,6 +15,7 @@
- import Monad(when)
- import IO(stdout, hFlush)
- import System(system, getEnv, getArgs, exitWith, ExitCode(..))  
-+import qualified System.Console.Editline.Readline as RL
- import OSSpecific(slash)
- import Directory
-
-@@ -75,8 +76,11 @@
-         else
-             return initialState
-             
--    -- Enter read-eval-print loop            
-+    -- Initialize editline
-+    RL.initialize
-+
-+    -- Enter read-eval-print loop 
-     loop stateAfterLoad
-     
-     return ()
-
-@@ -89,21 +89,24 @@
- 
- loop :: State -> IO State
- loop state = do
--    putStr (prompt state)
--    hFlush stdout
--    command' <- getLine
--    let command = trim command'
-+    command' <- RL.readline (prompt state)
-+    let command = fmap trim command'
-     newState <- case command of
--        (':':cmd:rest) -> 
-+        (Just (':':cmd:rest)) -> do
-+            RL.addHistory (':':cmd:rest)
-             processCommand (toLower cmd) (trim rest) state
--        (':':_) -> do
-+        (Just (':':_)) -> do
-             putStrLn "Expecting command after colon. Type :? for help"
-             return state
--        expression -> do
-+        (Just expression) -> do
-             if null expression 
-                 then return ()
--                else processExpression expression state
-+                else do
-+                    RL.addHistory expression
-+                    processExpression expression state
-             return state
-+        (Nothing) -> do
-+            do return state
-     loop newState
-   where
-     prompt :: State -> String
-
diff -rN -u old-helium/patches/04_fixes-for-ghc6 new-helium/patches/04_fixes-for-ghc6
--- old-helium/patches/04_fixes-for-ghc6	1970-01-01 00:00:00.000000000 +0000
+++ new-helium/patches/04_fixes-for-ghc6	2010-03-15 01:45:27.045710250 +0000
@@ -0,0 +1,63 @@
+# Description: Fixes for ghc6
+# Author: Arjan Oosting <arjan at debian.org>
+diff -urNad helium~/Top/src/Top/Ordering/Tree.hs helium/Top/src/Top/Ordering/Tree.hs
+--- helium~/Top/src/Top/Ordering/Tree.hs	2008-01-28 00:02:11.000000000 +0100
++++ helium/Top/src/Top/Ordering/Tree.hs	2008-01-28 00:02:29.000000000 +0100
+@@ -36,13 +36,15 @@
+ infixr 8 .>. , .>>. , .<. , .<<.
+ 
+ (.>.), (.>>.), (.<.), (.<<.) :: [a] -> Tree a -> Tree a
+-((.>.), (.>>.), (.<.), (.<<.)) = 
+-   let -- prevents adding an empty list
+-       f constructor direction as tree
+-          | null as   = tree 
+-          | otherwise = constructor direction as tree
+-   in (f AddList Down, f Spread Down, f AddList Up, f Spread Up)
++(.>.)  = addIfNotEmpty AddList Down
++(.>>.) = addIfNotEmpty Spread Down
++(.<.)  = addIfNotEmpty AddList Up
++(.<<.) = addIfNotEmpty Spread Up
+ 
++addIfNotEmpty :: (forall a . Direction -> [a] -> Tree a -> Tree a) -> Direction -> [b] -> Tree b -> Tree b
++addIfNotEmpty constructor direction as tree
++          | null as   = tree
++          | otherwise = constructor direction as tree
+ 
+ ------------------------------------------------------------------------
+ 
+diff -urNad helium~/Top/src/makefile helium/Top/src/makefile
+--- helium~/Top/src/makefile	2008-01-28 00:02:11.000000000 +0100
++++ helium/Top/src/makefile	2008-01-28 00:02:29.000000000 +0100
+@@ -51,7 +51,7 @@
+ 
+ topsolver-prof:
+ 	# build the Top constraint solver with profiling
+-	$(HC) $(HC_OPTS) --make -package text -prof -auto-all -o $(BIN_DIR)/topsolver TopSolver.hs
++	$(HC) $(HC_OPTS) --make -prof -auto-all -o $(BIN_DIR)/topsolver TopSolver.hs
+ 
+ #-----------------------------------------------------------------------
+ # Cobalt
+diff -urNad helium~/helium/src/Makefile.in helium/helium/src/Makefile.in
+--- helium~/helium/src/Makefile.in	2008-01-28 00:02:29.000000000 +0100
++++ helium/helium/src/Makefile.in	2008-01-28 00:03:59.000000000 +0100
+@@ -48,7 +48,7 @@
+ PACKAGENET = 
+ endif
+ HC_OPTS = -static -fglasgow-exts -fallow-undecidable-instances -fallow-overlapping-instances \
+-		$(PACKAGENET) -package lang -package text -package editline -i$(IFACES) $(EXTRA_HC_OPTS)
++		$(PACKAGENET) -package containers -package mtl -package parsec -package editline -i$(IFACES) $(EXTRA_HC_OPTS)
+ 
+ AG      = @WithAG@
+ AG_OPTS = -mscfr
+diff -urNad helium~/lvm/src/lib/makefile helium/lvm/src/lib/makefile
+--- helium~/lvm/src/lib/makefile	2008-01-28 00:02:11.000000000 +0100
++++ helium/lvm/src/lib/makefile	2008-01-28 00:02:29.000000000 +0100
+@@ -20,7 +20,7 @@
+ 
+ #the haskell compiler
+ HC	= ghc
+-HC_OPTS = -cpp -static -package lang -package text -i$(IFACES) $(EXTRA_HC_OPTS)
++HC_OPTS = -cpp -static -package parsec -i$(IFACES) $(EXTRA_HC_OPTS)
+ 
+ #Haskell sources
+ COMMON	= common/Id.hs common/IdMap.hs common/IdSet.hs \
diff -rN -u old-helium/patches/04_fixes-for-ghc6.dpatch new-helium/patches/04_fixes-for-ghc6.dpatch
--- old-helium/patches/04_fixes-for-ghc6.dpatch	2010-03-15 01:45:27.009708280 +0000
+++ new-helium/patches/04_fixes-for-ghc6.dpatch	1970-01-01 00:00:00.000000000 +0000
@@ -1,68 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 04_fixes-for-ghc6.dpatch by Arjan Oosting <arjan at debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
- at DPATCH@
-diff -urNad helium~/Top/src/Top/Ordering/Tree.hs helium/Top/src/Top/Ordering/Tree.hs
---- helium~/Top/src/Top/Ordering/Tree.hs	2008-01-28 00:02:11.000000000 +0100
-+++ helium/Top/src/Top/Ordering/Tree.hs	2008-01-28 00:02:29.000000000 +0100
-@@ -36,13 +36,15 @@
- infixr 8 .>. , .>>. , .<. , .<<.
- 
- (.>.), (.>>.), (.<.), (.<<.) :: [a] -> Tree a -> Tree a
--((.>.), (.>>.), (.<.), (.<<.)) = 
--   let -- prevents adding an empty list
--       f constructor direction as tree
--          | null as   = tree 
--          | otherwise = constructor direction as tree
--   in (f AddList Down, f Spread Down, f AddList Up, f Spread Up)
-+(.>.)  = addIfNotEmpty AddList Down
-+(.>>.) = addIfNotEmpty Spread Down
-+(.<.)  = addIfNotEmpty AddList Up
-+(.<<.) = addIfNotEmpty Spread Up
- 
-+addIfNotEmpty :: (forall a . Direction -> [a] -> Tree a -> Tree a) -> Direction -> [b] -> Tree b -> Tree b
-+addIfNotEmpty constructor direction as tree
-+          | null as   = tree
-+          | otherwise = constructor direction as tree
- 
- ------------------------------------------------------------------------
- 
-diff -urNad helium~/Top/src/makefile helium/Top/src/makefile
---- helium~/Top/src/makefile	2008-01-28 00:02:11.000000000 +0100
-+++ helium/Top/src/makefile	2008-01-28 00:02:29.000000000 +0100
-@@ -51,7 +51,7 @@
- 
- topsolver-prof:
- 	# build the Top constraint solver with profiling
--	$(HC) $(HC_OPTS) --make -package text -prof -auto-all -o $(BIN_DIR)/topsolver TopSolver.hs
-+	$(HC) $(HC_OPTS) --make -prof -auto-all -o $(BIN_DIR)/topsolver TopSolver.hs
- 
- #-----------------------------------------------------------------------
- # Cobalt
-diff -urNad helium~/helium/src/Makefile.in helium/helium/src/Makefile.in
---- helium~/helium/src/Makefile.in	2008-01-28 00:02:29.000000000 +0100
-+++ helium/helium/src/Makefile.in	2008-01-28 00:03:59.000000000 +0100
-@@ -48,7 +48,7 @@
- PACKAGENET = 
- endif
- HC_OPTS = -static -fglasgow-exts -fallow-undecidable-instances -fallow-overlapping-instances \
--		$(PACKAGENET) -package lang -package text -package editline -i$(IFACES) $(EXTRA_HC_OPTS)
-+		$(PACKAGENET) -package containers -package mtl -package parsec -package editline -i$(IFACES) $(EXTRA_HC_OPTS)
- 
- AG      = @WithAG@
- AG_OPTS = -mscfr
-diff -urNad helium~/lvm/src/lib/makefile helium/lvm/src/lib/makefile
---- helium~/lvm/src/lib/makefile	2008-01-28 00:02:11.000000000 +0100
-+++ helium/lvm/src/lib/makefile	2008-01-28 00:02:29.000000000 +0100
-@@ -20,7 +20,7 @@
- 
- #the haskell compiler
- HC	= ghc
--HC_OPTS = -cpp -static -package lang -package text -i$(IFACES) $(EXTRA_HC_OPTS)
-+HC_OPTS = -cpp -static -package parsec -i$(IFACES) $(EXTRA_HC_OPTS)
- 
- #Haskell sources
- COMMON	= common/Id.hs common/IdMap.hs common/IdSet.hs \
diff -rN -u old-helium/patches/05_fixes-for-64bit new-helium/patches/05_fixes-for-64bit
--- old-helium/patches/05_fixes-for-64bit	1970-01-01 00:00:00.000000000 +0000
+++ new-helium/patches/05_fixes-for-64bit	2010-03-15 01:45:27.045710250 +0000
@@ -0,0 +1,237 @@
+# Description: Fix for 64 bit
+# Author: Arjan Oosting <arjan at debian.org>
+diff -urNad helium~/lvm/src/lib/common/Byte.hs helium/lvm/src/lib/common/Byte.hs
+--- helium~/lvm/src/lib/common/Byte.hs	2007-02-05 23:44:40.000000000 +0100
++++ helium/lvm/src/lib/common/Byte.hs	2007-02-05 23:46:19.000000000 +0100
+@@ -27,6 +27,8 @@
+            , stringFromByteList, bytesFromByteList
+            ) where
+ 
++import Data.Word
++
+ import IO       ( IOMode(..) )
+ import Special  ( openBinary, writeBinaryChar, readBinary, closeBinary )
+ import Standard ( strict, foldlStrict )
+@@ -35,7 +37,7 @@
+ {----------------------------------------------------------------
+   types
+ ----------------------------------------------------------------}
+-type Byte   = Char
++type Byte   = Word8
+ 
+ data Bytes  = Nil
+             | Cons Byte   !Bytes    -- Byte is not strict since LvmWrite uses it lazily right now.
+@@ -52,19 +54,19 @@
+ ----------------------------------------------------------------}
+ byteFromInt8 :: Int -> Byte
+ byteFromInt8 i
+-  = toEnum (mod i 256)
++  = toEnum i
+   
+ intFromByte :: Byte -> Int
+ intFromByte b
+   = fromEnum b
+ 
+ bytesFromString :: String -> Bytes
+-bytesFromString s
+-  = bytesFromList s
++bytesFromString 
++  = bytesFromList . map (toEnum . fromEnum)
+ 
+ stringFromBytes :: Bytes -> String
+-stringFromBytes bs
+-  = listFromBytes bs
++stringFromBytes 
++  = map (toEnum . fromEnum) . listFromBytes 
+ 
+ bytesFromInt32 :: Int -> Bytes    -- 4 byte big-endian encoding
+ bytesFromInt32 i
+@@ -72,7 +74,7 @@
+         n1 = div n0 256
+         n2 = div n1 256
+         n3 = div n2 256
+-        xs = map byteFromInt8 [n3,n2,n1,n0]
++        xs = map (byteFromInt8 . (flip mod) 256) [n3,n2,n1,n0]
+     in bytesFromList xs
+ 
+ max32 :: Int
+@@ -131,7 +133,7 @@
+     write h bs
+       = case bs of
+           Nil       -> return[...incomplete...]



More information about the Pkg-haskell-commits mailing list