Annotation of /trunk/darcs/patches/darcs-1.0.8-ghc66.patch
Parent Directory | Revision Log
Revision 182 -
(hide annotations)
(download)
Sun May 13 19:55:54 2007 UTC (17 years, 4 months ago) by niro
File size: 3057 byte(s)
Sun May 13 19:55:54 2007 UTC (17 years, 4 months ago) by niro
File size: 3057 byte(s)
new patches
1 | niro | 182 | diff -urwpN darcs-1.0.8.orig/configure.ac darcs-1.0.8/configure.ac |
2 | --- darcs-1.0.8.orig/configure.ac 2006-06-16 20:59:29.000000000 +0200 | ||
3 | +++ darcs-1.0.8/configure.ac 2006-09-18 23:15:25.000000000 +0200 | ||
4 | @@ -110,6 +110,7 @@ WORKAROUND_POSIXSIGNALS([installHandler, | ||
5 | dnl Look for Text.Regex | ||
6 | |||
7 | GHC_CHECK_MODULE(Text.Regex( mkRegex, matchRegex, Regex ), text, mkRegex undefined) | ||
8 | +GHC_CHECK_MODULE(Text.Regex( mkRegex, matchRegex, Regex ), regex-compat, mkRegex undefined) | ||
9 | |||
10 | dnl See if we need a package for QuickCheck | ||
11 | |||
12 | @@ -117,13 +118,17 @@ GHC_CHECK_MODULE(Debug.QuickCheck( quick | ||
13 | |||
14 | dnl See if we need the util or mtl packages for Control.Monad | ||
15 | |||
16 | -GHC_CHECK_MODULE(Control.Monad.Error, util, putStr undefined) | ||
17 | -GHC_CHECK_MODULE(Control.Monad.Error, mtl, putStr undefined) | ||
18 | +GHC_CHECK_MODULE(Control.Monad.Error, util, strMsg "foo" :: String) | ||
19 | +GHC_CHECK_MODULE(Control.Monad.Error, mtl, strMsg "foo" :: String) | ||
20 | |||
21 | dnl See if we need a package for parsec... | ||
22 | |||
23 | GHC_CHECK_MODULE(Text.ParserCombinators.Parsec, parsec, errorPos undefined) | ||
24 | |||
25 | +dnl Check if we need package html | ||
26 | + | ||
27 | +GHC_CHECK_MODULE(Text.Html, html, text "foo") | ||
28 | + | ||
29 | dnl Deal with systems on which getCurrentDirectory uses '\\' rather than '/': | ||
30 | |||
31 | WORKAROUND_getCurrentDirectory | ||
32 | diff -urwpN darcs-1.0.8.orig/Lcs.lhs darcs-1.0.8/Lcs.lhs | ||
33 | --- darcs-1.0.8.orig/Lcs.lhs 2006-06-16 20:59:28.000000000 +0200 | ||
34 | +++ darcs-1.0.8/Lcs.lhs 2006-09-18 22:28:38.000000000 +0200 | ||
35 | @@ -358,7 +358,8 @@ shiftBoundaries c_a c_b p_a i_ j_ = | ||
36 | -- | goto next unchanged line, return the given line if unchanged | ||
37 | nextUnchanged :: BSTArray s -> Int -> ST s Int | ||
38 | nextUnchanged c i = do | ||
39 | - if i == (aLen c) + 1 then return i | ||
40 | + len <- aLenM c | ||
41 | + if i == len + 1 then return i | ||
42 | else do b <- readArray c i | ||
43 | if b then nextUnchanged c (i+1) | ||
44 | else return i | ||
45 | @@ -367,7 +368,8 @@ nextUnchanged c i = do | ||
46 | -- behind the last line | ||
47 | skipOneUnChanged :: BSTArray s -> Int -> ST s Int | ||
48 | skipOneUnChanged c i = do | ||
49 | - if i == (aLen c) + 1 then return i | ||
50 | + len <- aLenM c | ||
51 | + if i == len + 1 then return i | ||
52 | else do b <- readArray c i | ||
53 | if not b then return (i+1) | ||
54 | else skipOneUnChanged c (i+1) | ||
55 | @@ -381,8 +383,9 @@ nextUnchangedN c n i = do | ||
56 | |||
57 | -- | goto next changed line, return the given line if changed | ||
58 | nextChanged :: BSTArray s -> Int -> ST s (Maybe Int) | ||
59 | -nextChanged c i = | ||
60 | - if i <= aLen c | ||
61 | +nextChanged c i = do | ||
62 | + len <- aLenM c | ||
63 | + if i <= len | ||
64 | then do b <- readArray c i | ||
65 | if not b then nextChanged c (i+1) | ||
66 | else return $ Just i | ||
67 | @@ -430,8 +433,17 @@ initM a = listArray (0, length a) (0:a) | ||
68 | initP :: [PackedString] -> PArray | ||
69 | initP a = listArray (0, length a) (nilPS:a) | ||
70 | |||
71 | +#if __GLASGOW_HASKELL__ > 604 | ||
72 | +aLen :: (IArray a e) => a Int e -> Int | ||
73 | +aLen a = snd $ bounds a | ||
74 | +aLenM :: (MArray a e m) => a Int e -> m Int | ||
75 | +aLenM a = getBounds a >>= return . snd | ||
76 | +#else | ||
77 | aLen :: HasBounds a => a Int e -> Int | ||
78 | aLen a = snd $ bounds a | ||
79 | +aLenM :: (HasBounds a, Monad m) => a Int e -> m Int | ||
80 | +aLenM = return . snd . bounds | ||
81 | +#endif | ||
82 | \end{code} | ||
83 | |||
84 | \begin{code} |