Ticket #2532: unique-typeable

File unique-typeable, 17.7 KB (added by japple, 7 years ago)
Line 
1Thu Aug 21 18:10:16 PDT 2008 
2  * Add Typeable instance to Data.Unique
3
4New patches:
5
6[Add Typeable instance to Data.Unique
7**20080822011016] {
8hunk ./Data/Unique.hs 27
9+import Data.Typeable
10+
11hunk ./Data/Unique.hs 35
12--- compared for equality and ordering and hashed into 'Int'.
13+-- compared for equality and ordering and hashed into 'Int'. They may
14+-- also be injected into 'Data.Dynamic'.
15hunk ./Data/Unique.hs 39
16+uniqueTc = mkTyCon "Data.Unique"
17+instance Typeable Unique where
18+    typeOf _ = mkAppTy uniqueTc []
19+
20}
21
22Context:
23
24[remove some functions that aren't used in base
25Simon Marlow <[email protected]>**20080821142339]
26[remove __hscore_renameFile, it is no longer uesd
27Simon Marlow <[email protected]>**20080818155950
28 System.Directory implements renameFile using unix/Win32 now.
29]
30[Rewrite the documentation for forkOS again
31Simon Marlow <[email protected]>**20080818132856
32 Try to make it clearer that forkOS is only necessary when calling
33 foreing libraries that use thread-local state, and it has nothing to
34 do with scheduling behaviour between Haskell threads.  I also added
35 something about the performance impact of forkOS, and mentioned that
36 the main thread is a bound thread.
37]
38[nhc only: expose Foldable and Traversable instances of Array
39Ross Paterson <[email protected]>**20080817002719
40 
41 These were turned off as a side-effect of a previous nhc-only fix for
42 #2176 that is no longer needed.  They should be fine for nhc now.
43]
44[Fix hReady (trac #1063)
45Ian Lynagh <[email protected]>**20080816182715
46 We now throw an EOF exception when appropriate
47]
48[Fix oversight in Control.OldException
49Bertram Felgenhauer <[email protected]>**20080816132631
50 The NonTermination constructor slipped through in the Exception instance.
51]
52[Eliminate orphan rules and instances in the array package
53Ian Lynagh <[email protected]>**20080816122253]
54[Control.OldException: Map exceptions to old exceptions and back properly.
55Ian Lynagh <[email protected]>**20080814210219
56   * Control.OldException: Map exceptions to old exceptions and back properly.
57     
58 It's really necessary to map them back as well, or the RTS and base library
59 will not recognize exceptions that got caught and rethrown. (See #2508)
60 
61 Patch from Bertram Felgenhauer <[email protected]>
62]
63[add Traversable generalizations of mapAccumL and mapAccumR (#2461)
64Ross Paterson <[email protected]>**20080814162617]
65[simplify definition of Prelude.catch
66Ross Paterson <[email protected]>**20080814143650]
67[remove returns from void functions
68Ross Paterson <[email protected]>**20080814110841]
69[No reason for Handler and catches to exclude nhc98.
70[email protected]**20080813125850]
71[Must import ExitCode for its instance to be re-exported.
72[email protected]**20080813125710
73 The Cabal library depends on "instance Exception ExitCode", and expects
74 to import it from Control.Exception, not Control.Exception.Base.
75]
76[use New.catch instead of catchException in OldException
77Ross Paterson <[email protected]>**20080813071307]
78[use the Haskell 98 module Control.Exception.Base in the Concurrent modules
79Ross Paterson <[email protected]>**20080813000219]
80[export Control.Exception.Base
81Ross Paterson <[email protected]>**20080812233640]
82[use dummy implementation of timeout for all non-GHCs
83Ross Paterson <[email protected]>**20080812151602]
84[Hugs only: fix imports
85Ross Paterson <[email protected]>**20080812145654]
86[non-GHC: hide Prelude.catch
87Ross Paterson <[email protected]>**20080812145622]
88[add Control.Exception.Base to nhc98 build
89[email protected]**20080812174300]
90[bump to version 4.0
91Simon Marlow <[email protected]>**20080805153354]
92[Hugs only: don't import exception types -- their instances are now in Control.Exception.Base
93Ross Paterson <[email protected]>**20080812140433]
94[split most of Control.Exception into new Control.Exception.Base
95Ross Paterson <[email protected]>**20080812124912
96 
97 Move everything but catches/Handler into a new internal module.
98 This was needed to get the new exceptions working with Hugs, because Hugs
99 has the constraint that all Haskell 98 library modules, and everything
100 they include, must be Haskell 98.  This also involves a different
101 representation of SomeException for Hugs, so that type is exported
102 opaquely for Hugs.  Then Control.Exception.Base is Haskell 98 as far as
103 Hugs is concerned, but Control.Exception needs the extensions turned on.
104 
105 Control.Exception re-exports everything from Control.Exception.Base
106 except the functions used by the GHC runtime.
107]
108[remove kludges, now that Control.Exception is imported
109Ross Paterson <[email protected]>**20080811180328]
110[threadDelay and friends are GHC-only
111Ross Paterson <[email protected]>**20080811175039]
112[fix imports for non-GHC
113[email protected]**20080808092017]
114[Eq and Ord have moved into GHC.Classes
115Ian Lynagh <[email protected]>**20080807095352]
116[Use the proper CInt type in GHC.Unicode
117Ian Lynagh <[email protected]>**20080806232948]
118[Import wibbles
119Ian Lynagh <[email protected]>**20080806232055]
120[Remove unnecessary Data/Dynamic.hs-boot
121Ian Lynagh <[email protected]>**20080806230623]
122[Remove more redundant GHC.Float imports
123Ian Lynagh <[email protected]>**20080806225411]
124[Remove an unnecessary import
125Ian Lynagh <[email protected]>**20080806224742]
126[Move Int, Float and Double into ghc-prim:GHC.Types
127Ian Lynagh <[email protected]>**20080806191554]
128[Put some explicit import lists in Data.Typeable
129Ian Lynagh <[email protected]>**20080806190353]
130[Fix a couple of imports
131Ian Lynagh <[email protected]>**20080806165549]
132[Remove unused conditional import
133Ian Lynagh <[email protected]>**20080806124930]
134[Swap imports around to get GHC.ForeignPtr out of the base knot
135Ian Lynagh <[email protected]>**20080806121313]
136[Move some bits around to stop Data.Either being in the base import knot
137Ian Lynagh <[email protected]>**20080806120504]
138[Tweak an import
139Ian Lynagh <[email protected]>**20080806000440]
140[Remove the DynIOError constructor of IOErrorType
141Ian Lynagh <[email protected]>**20080805234720
142 As far as I can see it is never used or exported
143]
144[Move some internals around to simplify the import graph a bit
145Ian Lynagh <[email protected]>**20080805221341]
146[Move the Char datatype into ghc-prim
147Ian Lynagh <[email protected]>**20080805204009]
148[Remove an unnecessary import
149Ian Lynagh <[email protected]>**20080805182336]
150[The [] definition has moved to ghc-prim
151Ian Lynagh <[email protected]>**20080805182332]
152[Fix warnings
153Ian Lynagh <[email protected]>**20080805150250]
154[Add a missing case to Show AsyncException
155Ian Lynagh <[email protected]>**20080805142811]
156[Remove GHC.Dotnet
157Ian Lynagh <[email protected]>**20080804215840]
158[Hide standalone deriving clauses from haddock
159Ian Lynagh <[email protected]>**20080804211617]
160[Control.Exception doesn't need to export assertError
161Ian Lynagh <[email protected]>**20080804161838]
162[Generalise the type of mapException; pointed out by Isaac Dupree
163Ian Lynagh <[email protected]>**20080804160941]
164[Remove some unnecessary Data.Tuple imports
165Ian Lynagh <[email protected]>**20080804155956]
166[The tuple datatype definitions have moved to ghc-prim
167Ian Lynagh <[email protected]>**20080804155420]
168[make ExitCode an instance of Exception for nhc98
169[email protected]**20080805160330]
170[poke and peek come from Foreign.Storable
171[email protected]**20080804160616]
172[zipWithM_ comes from Control.Monad
173[email protected]**20080804160319]
174[Fix nhc98 code variations to use the extensible exception API.
175[email protected]**20080804155842
176 There is still only one real exception type in nhc98, so it is not truly
177 extensible.  But this is enough to get the base package building again.
178]
179[nhc98 needs the Prelude for this module
180[email protected]**20080804133853]
181[Change some imports and derive Show (Either a b)
182Ian Lynagh <[email protected]>**20080804004147
183 rather than writing it by hand in GHC.Show
184]
185[Windows fixes
186Ian Lynagh <[email protected]>**20080803180345]
187[Remove the duplicate definition of throwTo in Control.Exception
188Ian Lynagh <[email protected]>**20080803141703
189 It now imports GHC.Conc, so it is no longer necessary
190]
191[Remove the only import of GHC.Exts
192Ian Lynagh <[email protected]>**20080803141944]
193[Move assertError into GHC.IOBase
194Ian Lynagh <[email protected]>**20080803141040]
195[Use onException rather than catchAny
196Ian Lynagh <[email protected]>**20080803114104]
197[Generalise the type of onException
198Ian Lynagh <[email protected]>**20080803003001
199 The type of the thing to do on an exception is now
200     IO b
201 rather than
202     IO ()
203 which better matches functions like bracket.
204]
205[Remove the dangerous Exception functions
206Ian Lynagh <[email protected]>**20080802231358
207 Removed: catchAny, handleAny, ignoreExceptions
208 These make it easy to eat /any/ exception, which is rarely what you want.
209 Normally you either want to:
210 * only catch exceptions in a certain part of the hierarchy, e.g.
211   "file not found", in which case you should only catch exceptions
212   of the appropriate type,
213 or
214 * you want to do some cleanup when an exception happens, and then rethrow
215   the exception, in which case you should use onException, or one of the
216   bracketing functions.
217]
218[Remove an unused import
219Ian Lynagh <[email protected]>**20080801230343]
220[Remove unused imports
221Ian Lynagh <[email protected]>**20080801230059]
222[Remove unused imports in Control.Exception
223Ian Lynagh <[email protected]>**20080801225847]
224[Get rid of some duplicate imports
225Ian Lynagh <[email protected]>**20080801214933]
226[Remove the now-unused GHC/Conc.lhs-boot
227Ian Lynagh <[email protected]>**20080801214707]
228[Make some more imports non-recursive
229Ian Lynagh <[email protected]>**20080801214546]
230[Rejig some code so Control.Exception and GHC.Conc don't need recursive imports
231Ian Lynagh <[email protected]>**20080801214208]
232[Remove the now-unused GHC/TopHandler.lhs-boot
233Ian Lynagh <[email protected]>**20080801212105]
234[Reshuffle GHC.Conc/GHC.TopHandler a bit to remove a recursive import
235Ian Lynagh <[email protected]>**20080801211801]
236[Don't import Control.Concurrent.MVar in GHC.TopHandler
237Ian Lynagh <[email protected]>**20080801200123]
238[Export assertError from Control.Exception to make GHC happy
239Ian Lynagh <[email protected]>**20080801111716
240 It's a wired-in name in GHC. We should possibly move it to another module.
241]
242[TopHandler now uses the new extensible exceptions
243Ian Lynagh <[email protected]>**20080731153553]
244[Comment wibble
245Ian Lynagh <[email protected]>**20080730202127]
246[Make numericEnumFrom more efficient
247Ian Lynagh <[email protected]>**20080730202049]
248[Put in some parens to clarify how things parse
249Ian Lynagh <[email protected]>**20080730201934]
250[applied patches to make enumFrom and friends strict in arguments as per the Report; closes ticket #1997
251Bart Massey <[email protected]>**20080726080444]
252[Don't use "deriving Typeable" (for portability reasons)
253Ian Lynagh <[email protected]>**20080730194434]
254[Add onException
255Ian Lynagh <[email protected]>**20080730172014]
256[Fix whitespace
257Ian Lynagh <[email protected]>**20080730171951
258 The space after "\begin{code}" was confusing haddock
259]
260[Re-add blocked; it got lost in the extensible exceptions patches
261Ian Lynagh <[email protected]>**20080730145614]
262[Start to actually use extensible exceptions
263Ian Lynagh <[email protected]>**20080730145115]
264[Rejig the extensible exceptions so there is less circular importing
265Ian Lynagh <[email protected]>**20080730122539]
266[Define nonTermination for the RTS to use
267Ian Lynagh <[email protected]>**20080621144420
268 We'll probably need to do the same for some other exceptions too
269]
270[Use extensible exceptions at the lowest level
271Ian Lynagh <[email protected]>**20080621121501
272 Everything above is largely unchanged; just the type of catch and throw.
273]
274[add comment
275Simon Marlow <[email protected]>**20080730114559]
276[add some big warnings to the docs for unsafeIOToSTM (#2401)
277Simon Marlow <[email protected]>**20080730114554]
278[FIX #2376: inline shiftR
279Simon Marlow <[email protected]>**20080730103539
280 Duplicating the default definition for shiftR doesn't seem quite right
281 to me, but it gets the right results when compiling the example
282 program, and I couldn't find a better way to do it.
283]
284[Add instance Show Control.Exception.Exception for nhc98.
285[email protected]**20080728164537]
286[Extend nhc98's Exception type to resemble ghc's more closely
287[email protected]**20080728163445]
288[fix dummy async implementations for non-GHC
289Ross Paterson <[email protected]>**20080715125521]
290[Fix haddocking with older haddocks
291Ian Lynagh <[email protected]>**20080710190855]
292[Add threadStatus :: ThreadId -> IO ThreadStatus
293Simon Marlow <[email protected]>**20080710151711
294 
295 -- | The current status of a thread
296 data ThreadStatus
297   = ThreadRunning
298         -- ^the thread is currently runnable or running
299   | ThreadFinished
300         -- ^the thread has finished
301   | ThreadBlocked  BlockReason
302         -- ^the thread is blocked on some resource
303   | ThreadDied
304         -- ^the thread received an uncaught exception
305   deriving (Eq,Ord,Show)
306 
307 data BlockReason
308   = BlockedOnMVar
309         -- ^blocked on on 'MVar'
310   | BlockedOnBlackHole
311         -- ^blocked on a computation in progress by another thread
312   | BlockedOnException
313         -- ^blocked in 'throwTo'
314   | BlockedOnSTM
315         -- ^blocked in 'retry' in an STM transaction
316   | BlockedOnForeignCall
317         -- ^currently in a foreign call
318   | BlockedOnOther
319         -- ^blocked on some other resource.  Without @-threaded@,
320         -- I/O and 'threadDelay' show up as 'BlockedOnOther', with @-threaded@
321         -- they show up as 'BlockedOnMVar'.
322   deriving (Eq,Ord,Show)
323 
324 This is useful for concurrency debugging.  I've left threadStatus in
325 GHC.Conc for now, since the ThreadStatus type is somewhat GHC-specific.
326]
327[forkOS: start the new thread in blocked mode iff the parent was (#1048)
328Simon Marlow <[email protected]>**20080709135558
329 This matches the behaviour of forkIO
330]
331[Add Control.Exception.blocked :: IO Bool
332Simon Marlow <[email protected]>**20080709133139
333 Tells you whether async exceptions are currently blocked or not.
334]
335[FIX BUILD (on Windows)
336Simon Marlow <marlowsd@gmail.com>**20080709123110]
337[check CONST_SIGINT
338Simon Marlow <marlowsd@gmail.com>**20080709122527]
339[Make threadWaitRead/threadWaitWrite partially useable on Windows
340Simon Marlow <marlowsd@gmail.com>**20080709111008
341 
342 They work with -threaded by calling fdReady() in a separate thread.
343 
344 "threadWaitRead 0" also works without -threaded (because we happen to
345 know it's virtually equivalent to "hWaitForInput stdin (-1)").
346]
347[FIX #1198: hWaitForInput on Windows
348Simon Marlow <marlowsd@gmail.com>**20080708134254
349 Now we do the appropriate magic in fdReady() to detect when there is
350 real input available, as opposed to uninteresting console events.
351]
352[FIX part of #2301
353Simon Marlow <marlowsd@gmail.com>**20080709094437
354   
355 Control-C now causes the new exception (AsyncException UserInterrupt)
356 to be raised in the main thread.  The signal handler is set up by
357 GHC.TopHandler.runMainIO, and can be overriden in the usual way by
358 installing a new signal handler.  The advantage is that now all
359 programs will get a chance to clean up on ^C.
360 
361 When UserInterrupt is caught by the topmost handler, we now exit the
362 program via kill(getpid(),SIGINT), which tells the parent process that
363 we exited as a result of ^C, so the parent can take appropriate action
364 (it might want to exit too, for example).
365 
366 One subtlety is that we have to use a weak reference to the ThreadId
367 for the main thread, so that the signal handler doesn't prevent the
368 main thread from being subject to deadlock detection.
369]
370[() has moved to ghc-prim:GHC.Unit, and the Eq and Ord instances to Data.Tuple
371Ian Lynagh <igloo@earth.li>**20080624144932]
372[Add GHC.Exts.maxTupleSize :: Int, the size of the largest tuple supported
373Ian Lynagh <igloo@earth.li>**20080622141559]
374[Remove code for older GHC versions
375Ian Lynagh <igloo@earth.li>**20080620194521]
376[Make the macros in Typeable.h add type signatures
377Ian Lynagh <igloo@earth.li>**20080619235808]
378[Fix #2363: getChar cannot be interrupted with -threaded
379Simon Marlow <marlowsd@gmail.com>**20080619141911
380 Now in -threaded mode, instead of just making a blocking call to
381 read(), we call select() first to make sure the read() won't block,
382 and if it would block, then we use threadWaitRead.
383 
384 The idea is that the current thread must be interruptible while it
385 blocks.  This is a little slower than before, but the overhead only
386 applies to blocking Handles (stdin/stdout/stderr, and those created by
387 System.Process).
388]
389[Remove -fglasgow-exts from pragmas and comments
390Ian Lynagh <igloo@earth.li>**20080616230727]
391[Avoid using deprecated flags
392Ian Lynagh <igloo@earth.li>**20080616145207]
393[delete __hscore_{mkstemp,getrlimit,setrlimit} (moved to unix)
394Ross Paterson <ross@soi.city.ac.uk>**20080615224413]
395[Update WCsubst.c for Unicode 5.1.0, and add a README.Unicode
396Ian Lynagh <igloo@earth.li>**20080613201754
397 README.Unicode describes how to do updates in the future.
398]
399[Fix ubconfc
400Ian Lynagh <igloo@earth.li>**20080613201456
401 The current code doesn't seem to be what was used to generate WCsubst.c,
402 so I'm not sure if it never worked, or if my tools work slightly
403 differently to those of the previous user.
404]
405['permutations' is now more lazy and also faster
406Twan van Laarhoven <twanvl@gmail.com>**20080102231712]
407['subsequences' is now more lazy and also faster
408Twan van Laarhoven <twanvl@gmail.com>**20080102231629]
409[Add 'subsequences' and 'permutations' to Data.List
410Twan van Laarhoven <twanvl@gmail.com>**20071218154950]
411[Tweak the definition of (^) again
412Ian Lynagh <igloo@earth.li>**20080601120759
413 This fixes trac #2306 (do the minimum number of (*)s), and also means
414 that we don't use the value of (1 :: a) which causes problems if the
415 Num a definition isn't complete.
416]
417[note about evaluation affecting StableNames
418Simon Marlow <marlowsd@gmail.com>**20080527110549]
419[TAG 2008-05-28
420Ian Lynagh <igloo@earth.li>**20080528003830]
421Patch bundle hash:
422252015fa02a83b41eebf9591843e0e54a172ffa0