Ticket #638: replicateM_.patch

File replicateM_.patch, 6.7 KB (added by igloo, 9 years ago)
Line 
1
2New patches:
3
4[Improved replicateM_
5Einar Karttunen <[email protected]>**20051214110700] {
6hunk ./base/Control/Monad.hs 220
7-replicateM_ n x   = sequence_ (replicate n x)
8+replicateM_ k act = if k <= 0 then return () else loop k
9+    where loop 0 = return ()
10+          loop k = act >> loop (k-1)
11+
12+
13}
14
15Context:
16
17[[project @ 2005-12-05 13:31:04 by panne]
18panne**20051205133104
19 For the 1000th time: Fixed DocBook XML. Please, please do a "make validate"
20 before a check-in... >:-(
21]
22[[project @ 2005-12-05 11:42:47 by simonmar]
23simonmar**20051205114247
24 Add IO versions of the STM primitives that allocate new transactional variables:
25 
26   newTVarIO :: a -> IO (TVar a)
27   newTChanIO :: IO (TChan a)
28   newTMVarIO :: a -> IO (TMVar a)
29 
30 These can be used inside unsafePerformIO, unlike the STM versions.
31]
32[[project @ 2005-12-05 11:21:22 by malcolm]
33malcolm**20051205112122
34 Avoid clashes with Prelude type names in code generated from XML DTD.
35]
36[[project @ 2005-12-05 02:16:19 by ijones]
37ijones**20051205021619
38 docs for cabal-version field
39]
40[[project @ 2005-12-05 02:05:18 by ijones]
41ijones**20051205020518
42 * adding cabal-version flag
43   * check for correct cabal version during parsing
44 
45   I throw a parse error if this package has the wrong cabal version.
46   This is so that the user can get this error before getting an error
47   for eg. an unknown field.  Also check it in the sanity checker.
48 
49   I just hard-code the cabal version in the source, it would be nicer if
50   we got it from the .cabal file.  cabal could include the version in
51   the cpp flags, but cabal's setup file needs to build without cabal, so
52   that wouldn't actually work for us ahem.
53]
54[[project @ 2005-12-04 00:39:56 by ijones]
55ijones**20051204003956
56 Moving CabalInstall to its own directory.
57]
58[[project @ 2005-12-03 17:32:01 by jpbernardy]
59jpbernardy**20051203173201
60 Removed spurious constraint for Monoid (IntMap a) instance
61]
62[[project @ 2005-12-02 14:29:28 by simonmar]
63simonmar**20051202142928
64 avoid recursive module trap with Haddock
65]
66[[project @ 2005-12-02 12:26:22 by simonmar]
67simonmar**20051202122622
68 Apply rev 1.24 from FreeBSD's copy of this file.  Commit message from
69 FreeBSD:
70 
71    The algorithm that computes the tables used in the BM search
72    algorithm sometimes access an array beyond it's length. This only
73    happens in the last iteration of a loop, and the value fetched is
74    not used then, so the bug is a relatively innocent one. Fix this by
75    not fetching any value on the last iteration of said loop.
76 
77    Submitted by:       MKI <[email protected]>
78 
79 This is the cause of bug #1194393 (crash in darcs on Windows).
80]
81[[project @ 2005-12-02 12:09:08 by malcolm]
82malcolm**20051202120908
83 Fix for parsing empty lists.
84]
85[[project @ 2005-12-02 11:37:50 by malcolm]
86malcolm**20051202113750
87 Extra instances of Show.
88]
89[[project @ 2005-12-02 11:21:32 by malcolm]
90malcolm**20051202112132
91 wibbles
92]
93[[project @ 2005-12-01 17:55:58 by malcolm]
94malcolm**20051201175558
95 Improve contentspec pare error messages.
96]
97[[project @ 2005-12-01 17:47:30 by malcolm]
98malcolm**20051201174730
99 Commit to error inside mixed content spec.
100]
101[[project @ 2005-12-01 16:54:53 by malcolm]
102malcolm**20051201165453
103 update docs ready for another unstable release.
104]
105[[project @ 2005-12-01 16:53:59 by malcolm]
106malcolm**20051201165359
107 formatting wibble
108]
109[[project @ 2005-12-01 16:30:16 by malcolm]
110malcolm**20051201163016
111 Avoid confusing haddock.
112]
113[[project @ 2005-12-01 16:22:11 by malcolm]
114malcolm**20051201162211
115 List missing file, update version num.
116]
117[[project @ 2005-12-01 12:37:23 by simonmar]
118simonmar**20051201123723
119 oops, forgot to remove forkIO from here
120]
121[[project @ 2005-12-01 12:32:24 by simonmar]
122simonmar**20051201123224
123 export childHandler
124]
125[[project @ 2005-11-30 16:56:24 by simonmar]
126simonmar**20051130165624
127 - move forkIO into GHC.Conc, so that the I/O manager can use proper forkIO
128   with an exception handler.  This required TopHandler.lhs-boot.  It's the
129   right thing, though, since the forkIO implementation is GHC-specific.
130 
131 - check for out-of-range file descriptors in the I/O manager, rather than
132   just exploding.  The I/O manager will exit ungracefully, but at least
133   there will be an error message.
134]
135[[project @ 2005-11-30 12:24:33 by simonmar]
136simonmar**20051130122433
137 export registerDelay
138]
139[[project @ 2005-11-30 12:24:18 by simonmar]
140simonmar**20051130122418
141 Add
142 
143   registerDelay :: Int -> IO (TVar Bool)
144 
145 for implementing delays and timeouts in STM.  The delay is implemented
146 in the same way as threadDelay.  Currently doesn't work on Windows or
147 without -threaded (I do intend to make it work on Windows, though).
148]
149[[project @ 2005-11-29 17:38:24 by malcolm]
150malcolm**20051129173824
151 Generated code requires fewer imports, and better whitespacing.
152]
153[[project @ 2005-11-29 17:37:23 by malcolm]
154malcolm**20051129173723
155 New combinator 'optional'.
156]
157[[project @ 2005-11-29 17:35:13 by malcolm]
158malcolm**20051129173513
159 Another fix for 'text' combinator.  When you find the end of the string,
160 by discovering a tagged element, PUT THE ELEMENT BACK into the incoming
161 token stream!  Otherwise it gets left out of the parsed sequence...
162]
163[[project @ 2005-11-29 16:49:14 by malcolm]
164malcolm**20051129164914
165 Because 'text' might fail, we must wrap a definite required text item to
166 permit it to return the empty string.
167]
168[[project @ 2005-11-29 16:43:06 by malcolm]
169malcolm**20051129164306
170 The 'text' combinator should fail on empty input, rather than succeed
171 with the empty string as result.  Otherwise, it cannot be used inside a
172 choice combinator.
173]
174[[project @ 2005-11-29 14:31:59 by ross]
175ross**20051129143159
176 As foreshadowed on the libraries list, introduce new classes:
177 
178 Applicative (formerly known as Idiom): generalizes (but does not replace)
179 both Monad and Monoid.
180 
181 Traversable: containers that can be traversed, executing actions and
182 re-assembling the results.  This class generalizes and replaces FunctorM,
183 because it requires Applicative instead of Monad.
184 
185 Foldable: containers that can be folded over a Monoid.  Traversable
186 supplies a default definition, but some structures, e.g. Set, are Foldable
187 but not Traversable.
188]
189[TAG Last common state before ghc-6-4-branch
190John Goerzen <[email protected]>**20051128201854]
191[[project @ 2005-11-28 17:47:10 by malcolm]
192malcolm**20051128174710
193 Update DtdToHaskell to generate instances of the new XmlContent class.
194 Generates compilable code, but still to be fully tested.
195]
196[[project @ 2005-11-28 16:04:21 by panne]
197panne**20051128160422
198 Cleanly separated our representation of devices and contexts from OpenAL's.
199 This makes it easier to attach some data later...
200]
201[TAG Initial conversion from CVS complete
202John Goerzen <[email protected]>**20051128200748]
203Patch bundle hash:
204bd822c65844ab7e928dfb985173af55781afd8f6