Ticket #3544: instance_IsString_ShowS.patch

File instance_IsString_ShowS.patch, 13.3 KB (added by basvandijk, 5 years ago)

Darcs patch that adds instance IsString? ShowS

Line 
1Sun Sep 27 22:10:49 CEST 2009  Bas van Dijk <v.dijk.bas@gmail.com>
2  * Added instance IsString ShowS where fromString = showString
3
4New patches:
5
6[Added instance IsString ShowS where fromString = showString
7Bas van Dijk <v.dijk.bas@gmail.com>**20090927201049
8 Ignore-this: 8c115be623387cfe74f8cecdc210747f
9] {
10hunk ./GHC/Show.lhs 3
11 \begin{code}
12 {-# OPTIONS_GHC -XNoImplicitPrelude #-}
13+{-# OPTIONS_GHC -XTypeSynonymInstances #-}
14 {-# OPTIONS_HADDOCK hide #-}
15 -----------------------------------------------------------------------------
16 -- |
17hunk ./GHC/Show.lhs 39
18 
19 import GHC.Base
20 import Data.Maybe
21+import Data.String (IsString)
22 import GHC.List ((!!), foldr1)
23 \end{code}
24 
25hunk ./GHC/Show.lhs 57
26 -- concatenation of results using function composition.
27 type ShowS = String -> String
28 
29+instance IsString ShowS where
30+    fromString = showString
31+
32 -- | Conversion of values to readable 'String's.
33 --
34 -- Minimal complete definition: 'showsPrec' or 'show'.
35}
36
37Context:
38
39[Fix the error message when flushing the read buffer of a non-seekable Handle
40Simon Marlow <marlowsd@gmail.com>**20090923090536
41 Ignore-this: 4342026df93759d99480f4e13f80a492
42]
43[Fix #3534: No need to flush the byte buffer when setting binary mode
44Simon Marlow <marlowsd@gmail.com>**20090923090445
45 Ignore-this: 625817ed7ae2c12291eb993a99dc640a
46]
47[Use let !y = x in .. x .. instead of seq in $! and evaluate (#2273)
48Simon Marlow <marlowsd@gmail.com>**20090916140454]
49[make some Applicative functions into methods, and split off Data.Functor (proposal #3335)
50Ross Paterson <ross@soi.city.ac.uk>**20090915173109
51 Ignore-this: a0cff4de6dfdbcbd56a66101bc4855a9
52 
53 The following functions
54 
55     (<$) :: Functor f => a -> f b -> f a
56     (*>) :: Applicative f => f a -> f b -> f b
57     (<*) :: Applicative f => f a -> f b -> f a
58     some :: Alternative f => f a -> f [a]
59     many :: Alternative f => f a -> f [a]
60 
61 are moved into the corresponding classes, with the existing implementations
62 as default definitions.  This gives people creating instances the option of
63 defining specialized implementations of these functions, though they should
64 be equivalent to the default definitions.
65 
66 Although (<$) is now a method of the Functor class, it is hidden in the
67 re-export by the Prelude, Control.Monad and Monad.  The new module
68 Data.Functor exposes the full class, plus the function (<$>).  These are
69 also re-exported by Control.Applicative.
70]
71[On Windows, use the console code page for text file encoding/decoding.
72Judah Jacobson <judah.jacobson@gmail.com>**20090913022126
73 Ignore-this: 86c2f2db8ef92b751599795d3195187b
74 
75 We keep all of the code page tables in the module
76 GHC.IO.Encoding.CodePage.Table.  That file was generated automatically
77 by running codepages/MakeTable.hs; more details are in the comments at the
78 start of that script.
79 
80 Storing the lookup tables adds about 40KB to each statically linked executable;
81 this only increases the size of a "hello world" program by about 7%.
82 
83 Currently we do not support double-byte encodings (Chinese/Japanese/Korean), since
84 including those codepages would increase the table size to 400KB.  It will be
85 straightforward to implement them once the work on library DLLs is finished.
86]
87[Fix "init" docs: the input list need not be finite. Fixes trac #3465
88Ian Lynagh <igloo@earth.li>**20090911210437]
89[Bump base version to 4.2.0.0
90Ian Lynagh <igloo@earth.li>**20090911153913]
91[Address #3310
92Simon Marlow <marlowsd@gmail.com>**20090830152850
93 Ignore-this: 40c7f7c171ee299a83092fd360a952b7
94 
95  - Rename BlockedOnDeadMVar   -> BlockedIndefinitelyOnMVar
96  - Rename BlockedIndefinitely -> BlockedIndefinitelyOnSTM
97  - instance Show BlockedIndefinitelyOnMVar is now
98      "blocked indefinitely in an MVar operation"
99  - instance Show BlockedIndefinitelyOnSTM is now
100      "blocked indefinitely in an STM transaction"
101 
102 clients using Control.OldException will be unaffected (the new
103 exceptions are mapped to the old names).  However, for base4-compat
104 we'll need to make a version of catch/try that does a similar
105 mapping.
106]
107[Fix unicode conversion for MSB architectures
108Ben.Lippmeier@anu.edu.au**20090830130028
109 This fixes the SPARC/Solaris build.
110]
111[Fix #3441: detect errors in partial sequences
112Simon Marlow <marlowsd@gmail.com>**20090830075909
113 Ignore-this: d12a75d95e0cae5eb1555266810ec281
114]
115[Fix hWaitForInput
116Simon Marlow <marlowsd@gmail.com>**20090827152116
117 Ignore-this: 2550e911f1a4d4357a5aa8d1764238ce
118 It was erroneously waiting when there were bytes to decode waiting in
119 the byte buffer.
120]
121[fix debugging code
122Simon Marlow <marlowsd@gmail.com>**20090827150628
123 Ignore-this: e1c82fdc19a22e247cd69ff6fa11921d
124]
125[Allow for configurable iconv include and library locations.
126Matthias Kilian <kili@outback.escape.de>**20090826154406
127 Ignore-this: be95fab611a5534cf184b508964ed498
128 This should help to fix the build on OpenBSD.
129]
130[typo in comment
131Simon Marlow <marlowsd@gmail.com>**20090826085252
132 Ignore-this: 1903ee0f354157a6ed3871c100f6b1b9
133]
134[un-hide some modules from the Haddock docs
135Simon Marlow <marlowsd@gmail.com>**20090825152457
136 Ignore-this: dce6606f93cf977fb24ebe99082dfa62
137]
138[Apply fix for #1548, from squadette@gmail.com
139Simon Marlow <marlowsd@gmail.com>**20090819120700
140 Ignore-this: 31c237c46a6445f588ed4b8c51bb6231
141]
142[improvements to Data.Fixed: instances for Typeable and Data, more predefined types
143Ashley Yakeley <ashley@semantic.org>**20090812055058
144 Ignore-this: feeece36d5632f02a05d137d2a39ab78
145]
146[Fix "Cabal check" warnings
147Ian Lynagh <igloo@earth.li>**20090811215856]
148[Add a GHC.Constants module; fixes trac #3094
149Ian Lynagh <igloo@earth.li>**20090809183252]
150[Apply proposal #3393
151Ian Lynagh <igloo@earth.li>**20090809134717
152 Add openTempFileWithDefaultPermissions and
153 openBinaryTempFileWithDefaultPermissions.
154]
155[Add some more C wrappers; patch from Krister Walfridsson
156Ian Lynagh <igloo@earth.li>**20090807200631
157 Fixes 21 testsuite errors on NetBSD 5.99.
158]
159[Fixing configure for autoconf 2.64
160Alexander Dunlap <alexander.dunlap@gmail.com>**20090805060748
161 Ignore-this: 992ab91ae3d68c12dbb265776e33e243
162]
163[add INLINE toList
164Ross Paterson <ross@soi.city.ac.uk>**20090806142853
165 Ignore-this: aba16aabb17d5dca44f15d188945680e
166 
167 In anticipation of the fixing of #2353.
168]
169[fix a copyright
170Simon Marlow <marlowsd@gmail.com>**20090805134045
171 Ignore-this: b0ffbdd38fbba121e8bcba37c4082a60
172]
173[Tweak the BufferedIO class to enable a memory-mapped file implementation
174Simon Marlow <marlowsd@gmail.com>**20090805134036
175 Ignore-this: ec67d7a0a6d977438deaa342503f77e0
176 We have to eliminate the assumption that an empty write buffer can be
177 constructed by setting the buffer pointers to zero: this isn't
178 necessarily the case when the buffer corresponds to a memory-mapped
179 file, or other in-memory device implementation.
180]
181[Deprecate Control.OldException
182Ian Lynagh <igloo@earth.li>**20090804143910]
183[Windows build fix, following RTS tidyup
184Simon Marlow <marlowsd@gmail.com>**20090803131121
185 Ignore-this: ce862fb91c2b234211a8757f98690778
186]
187[Updates to follow the RTS tidyup
188Simon Marlow <marlowsd@gmail.com>**20090801220743
189 Ignore-this: 6e92412df93a66c12d75344053d5634
190 C functions like isDoubleNaN moved here (primFloat.c)
191]
192[Add integer-simple as a build option
193Ian Lynagh <igloo@earth.li>**20090722013151]
194[Use shift[LR]Integer in the Bits Integer instance
195Ian Lynagh <igloo@earth.li>**20090721222440]
196[depend directly on integer-gmp, rather than indirecting through integer
197Ian Lynagh <igloo@earth.li>**20090721185228]
198[Move the instances of Functor and Monad IO to GHC.Base, to avoid orphans
199Simon Marlow <marlowsd@gmail.com>**20090722102130
200 Ignore-this: a7d85ac0025d559674249de0108dbcf4
201]
202[move "instance Exception Dynamic" so it isn't an orphan
203Simon Marlow <marlowsd@gmail.com>**20090721093854
204 Ignore-this: 5ede91ecfec2112c91b699d4de87cd02
205]
206[Improve the index checking for array accesses; fixes #2120 #2669
207Ian Lynagh <igloo@earth.li>**20090719153228
208 As well as checking that offset we are reading is actually inside the
209 array, we now also check that it is "in range" as defined by the Ix
210 instance. This fixes confusing behaviour (#2120) and improves some error
211 messages (#2669).
212]
213[Make chr say what its argument was, if it's a bad argument
214Ian Lynagh <igloo@earth.li>**20090718151049]
215[remove unused warning
216Simon Marlow <marlowsd@gmail.com>**20090715124416
217 Ignore-this: 31f613654089d0f4a44363946087b41e
218]
219[warning fix: -fno-implicit-prelude -> -XNoImplicitPrelude
220Simon Marlow <marlowsd@gmail.com>**20090715122839
221 Ignore-this: dc8957249731d5bcb71c01899e5adf2b
222]
223[Add hGetEncoding :: Handle -> IO (Maybe TextEncoding)
224Simon Marlow <marlowsd@gmail.com>**20090715122519
225 Ignore-this: 14c3eff996db062da1199739781e4708
226 as suggested during the discussion on the libraries list
227]
228[Add more documentation to mkTextEncoding
229Simon Marlow <marlowsd@gmail.com>**20090715122414
230 Ignore-this: 97253b2624267df3a246a18121e8ea81
231 noting that "//IGNORE" and "//TRANSLIT" suffixes can be used with GNU
232 iconv.
233]
234[Add the utf8_bom codec
235Simon Marlow <marlowsd@gmail.com>**20090715122257
236 Ignore-this: 1c9396cd805201fe873a39382ced79c7
237 as suggested during the discussion on the libraries list.
238]
239[Export Unicode and newline functionality from System.IO; update Haddock docs
240Simon Marlow <marlowsd@gmail.com>**20090713113104
241 Ignore-this: c3f017a555335aa55d106253393f72e2
242]
243[add a comment about the non-workingness of CHARBUF_UTF16
244Simon Marlow <marlowsd@gmail.com>**20090707124406
245 Ignore-this: 98d00411b68d688b3b4cffc9507b1f35
246]
247[Fix build on Windows
248Ian Lynagh <igloo@earth.li>**20090711004351]
249[Fix some "warn-unused-do-bind" warnings where we want to ignore the value
250Ian Lynagh <igloo@earth.li>**20090710204513]
251[Use throwErrnoIfMinus1_ when calling getrusage
252Ian Lynagh <igloo@earth.li>**20090710204221]
253[Remove an unused import
254Ian Lynagh <igloo@earth.li>**20090710153345]
255[reportStackOverflow now returns IO ()
256Ian Lynagh <igloo@earth.li>**20090710153257
257 It used to do "return undefined" to return IO a.
258]
259[GHC.Conc.reportError now returns IO ()
260Ian Lynagh <igloo@earth.li>**20090710152646
261 It used to return IO a, by "return undefined".
262]
263[Fix some "warn-unused-do-bind" warnings where we want to ignore the value
264Ian Lynagh <igloo@earth.li>**20090710152526]
265[Minor SampleVar refactoring
266Ian Lynagh <igloo@earth.li>**20090710151438]
267[Fix "warn-unused-do-bind" warnings in GHC/IO/Handle/Text.hs
268Ian Lynagh <igloo@earth.li>**20090710122905]
269[Fix some "warn-unused-do-bind" warnings where we just want to ignore the result
270Ian Lynagh <igloo@earth.li>**20090710005638]
271[Use the result of writeCharBuf in GHC/IO/Encoding/Latin1.hs too
272Ian Lynagh <igloo@earth.li>**20090710004032]
273[Minor code tidyups in GHC.Conc
274Ian Lynagh <igloo@earth.li>**20090710003801]
275[Fix "warn-unused-do-bind" warning in GHC.Conc
276Ian Lynagh <igloo@earth.li>**20090710003530
277 If we fail to communicate with the IO manager then we print a warning
278 using debugErrLn from the ghc-prim package.
279]
280[Fix "warn-unused-do-bind" warnings in System.Posix.Internals
281Ian Lynagh <igloo@earth.li>**20090709164546]
282[Fix "warn-unused-do-bind" warnings where we really do want to ignore the result
283Ian Lynagh <igloo@earth.li>**20090709163912]
284[Add back imports needed on Windows
285Ian Lynagh <igloo@earth.li>**20090707181924]
286[Remove unused imports
287Ian Lynagh <igloo@earth.li>**20090707115810]
288[Remove unused imports from base
289simonpj@microsoft.com**20090706111842
290 Ignore-this: f9b5f353e3bb820f787c56d615b28765
291 
292 These unused imports are detected by the new unused-import code
293 
294]
295[Use the result of writeCharBuf
296Simon Marlow <marlowsd@gmail.com>**20090706133303
297 Ignore-this: 52288dd559bf4c4f313df6197091d935
298   
299 This only makes a difference when CHARBUF_UTF16 is in use, which it
300 normally isn't.  I suspect CHARBUF_UTF16 doesn't currently work for
301 other reasons (CHARBUF_UTF16 was an experiment before I wrote the
302 GHC.IO.Encoding.UTF* codecs), but this patch at least makes it
303 slightly closer to working.
304]
305[Remove some cruft from Data.HashTable
306Ian Lynagh <igloo@earth.li>**20090706181630]
307[Add 'eof' to Text.ParserCombinators.ReadP
308simonpj@microsoft.com**20090706111801
309 Ignore-this: 2aea7b848e00c894761bc4011adaa95d
310 
311 Add a ReadP parser that succeeds at the end of input. Very useful!
312 
313]
314[Don't export CLDouble for GHC; fixes trac #2793
315Ian Lynagh <igloo@earth.li>**20090705155120
316 We never really supported CLDouble (it was a plain old double underneath),
317 and pretending that we do does more harm than good.
318]
319[a byte between 0x80 and 0xBF is illegal immediately (#3341)
320Simon Marlow <marlowsd@gmail.com>**20090702081415
321 Ignore-this: dc19ef59a1a21118d5a7dd38aa2f611c
322]
323[avoid a warning
324Simon Marlow <marlowsd@gmail.com>**20090630084134
325 Ignore-this: c92a45ee216faf01327feae9fe06d6e2
326]
327[Add a wrapper for libiconv.
328Matthias Kilian <kili@outback.escape.de>**20090629183634
329 Ignore-this: 23c6047c0d71b745b495cc223574a47f
330]
331[#include <sys/times.h> if we have it (should fix build problems)
332Simon Marlow <marlowsd@gmail.com>**20090629085351
333 Ignore-this: a35e93b37ca9595c73460243180f4b9d
334]
335[set binary mode for existing FDs on Windows (fixes some GHCi test failures)
336Simon Marlow <marlowsd@gmail.com>**20090626120522
337 Ignore-this: 580cf636e9c77d8427aff6861d089481
338]
339[Move directory-related stuff to the unix package
340Simon Marlow <marlowsd@gmail.com>**20090625120325
341 Ignore-this: b997b3cbce0a46ca87ad825bbdc0a411
342 now that it isn't used on Windows any more.
343]
344[TAG 2009-06-25
345Ian Lynagh <igloo@earth.li>**20090625160056]
346Patch bundle hash:
3478f76c17e2da4ad1ccf962b1ea9db32aed39a3141