Ticket #1568: mv_signals_base.patch

File mv_signals_base.patch, 77.3 KB (added by igloo, 8 years ago)
Line 
1
2New patches:
3
4[Remove System.Posix.Signals (moving to unix)
5Ian Lynagh <[email protected]>**20070729215213] {
6hunk ./System/Posix/Signals.hs 1
7------------------------------------------------------------------------------
8--- |
9--- Module      :  System.Posix.Signals
10--- Copyright   :  (c) The University of Glasgow 2002
11--- License     :  BSD-style (see the file libraries/base/LICENSE)
12---
13--- Maintainer  :  [email protected]
14--- Stability   :  provisional
15--- Portability :  non-portable (requires POSIX)
16---
17--- POSIX signal support
18---
19------------------------------------------------------------------------------
20-
21-#include "HsBaseConfig.h"
22-
23-module System.Posix.Signals (
24-#ifndef mingw32_HOST_OS
25-  -- * The Signal type
26-  Signal,
27-
28-  -- * Specific signals
29-  nullSignal,
30-  internalAbort, sigABRT,
31-  realTimeAlarm, sigALRM,
32-  busError, sigBUS,
33-  processStatusChanged, sigCHLD,
34-  continueProcess, sigCONT,
35-  floatingPointException, sigFPE,
36-  lostConnection, sigHUP,
37-  illegalInstruction, sigILL,
38-  keyboardSignal, sigINT,
39-  killProcess, sigKILL,
40-  openEndedPipe, sigPIPE,
41-  keyboardTermination, sigQUIT,
42-  segmentationViolation, sigSEGV,
43-  softwareStop, sigSTOP,
44-  softwareTermination, sigTERM,
45-  keyboardStop, sigTSTP,
46-  backgroundRead, sigTTIN,
47-  backgroundWrite, sigTTOU,
48-  userDefinedSignal1, sigUSR1,
49-  userDefinedSignal2, sigUSR2,
50-#if CONST_SIGPOLL != -1
51-  pollableEvent, sigPOLL,
52-#endif
53-  profilingTimerExpired, sigPROF,
54-  badSystemCall, sigSYS,
55-  breakpointTrap, sigTRAP,
56-  urgentDataAvailable, sigURG,
57-  virtualTimerExpired, sigVTALRM,
58-  cpuTimeLimitExceeded, sigXCPU,
59-  fileSizeLimitExceeded, sigXFSZ,
60-
61-  -- * Sending signals
62-  raiseSignal,
63-  signalProcess,
64-  signalProcessGroup,
65-
66-#ifdef __GLASGOW_HASKELL__
67-  -- * Handling signals
68-  Handler(..),
69-  installHandler,
70-#endif
71-
72-  -- * Signal sets
73-  SignalSet,
74-  emptySignalSet, fullSignalSet,
75-  addSignal, deleteSignal, inSignalSet,
76-
77-  -- * The process signal mask
78-  getSignalMask, setSignalMask, blockSignals, unblockSignals,
79-
80-  -- * The alarm timer
81-  scheduleAlarm,
82-
83-  -- * Waiting for signals
84-  getPendingSignals,
85-#ifndef cygwin32_HOST_OS
86-  awaitSignal,
87-#endif
88-
89-#ifdef __GLASGOW_HASKELL__
90-  -- * The @NOCLDSTOP@ flag
91-  setStoppedChildFlag, queryStoppedChildFlag,
92-#endif
93-
94-  -- MISSING FUNCTIONALITY:
95-  -- sigaction(), (inc. the sigaction structure + flags etc.)
96-  -- the siginfo structure
97-  -- sigaltstack()
98-  -- sighold, sigignore, sigpause, sigrelse, sigset
99-  -- siginterrupt
100-#endif
101-  ) where
102-
103-import Prelude -- necessary to get dependencies right
104-
105-import Foreign
106-import Foreign.C
107-import System.IO.Unsafe
108-import System.Posix.Types
109-import System.Posix.Internals
110-
111-#ifndef mingw32_HOST_OS
112--- WHOLE FILE...
113-
114-#ifdef __GLASGOW_HASKELL__
115-#include "Signals.h"
116-import GHC.Conc        ( ensureIOManagerIsRunning )
117-#endif
118-
119--- -----------------------------------------------------------------------------
120--- Specific signals
121-
122-type Signal = CInt
123-
124-nullSignal :: Signal
125-nullSignal = 0
126-
127-sigABRT   :: CInt
128-sigABRT   = CONST_SIGABRT
129-sigALRM   :: CInt
130-sigALRM   = CONST_SIGALRM
131-sigBUS    :: CInt
132-sigBUS    = CONST_SIGBUS
133-sigCHLD   :: CInt
134-sigCHLD   = CONST_SIGCHLD
135-sigCONT   :: CInt
136-sigCONT   = CONST_SIGCONT
137-sigFPE    :: CInt
138-sigFPE    = CONST_SIGFPE
139-sigHUP    :: CInt
140-sigHUP    = CONST_SIGHUP
141-sigILL    :: CInt
142-sigILL    = CONST_SIGILL
143-sigINT    :: CInt
144-sigINT    = CONST_SIGINT
145-sigKILL   :: CInt
146-sigKILL   = CONST_SIGKILL
147-sigPIPE   :: CInt
148-sigPIPE   = CONST_SIGPIPE
149-sigQUIT   :: CInt
150-sigQUIT   = CONST_SIGQUIT
151-sigSEGV   :: CInt
152-sigSEGV   = CONST_SIGSEGV
153-sigSTOP   :: CInt
154-sigSTOP   = CONST_SIGSTOP
155-sigTERM   :: CInt
156-sigTERM   = CONST_SIGTERM
157-sigTSTP   :: CInt
158-sigTSTP   = CONST_SIGTSTP
159-sigTTIN   :: CInt
160-sigTTIN   = CONST_SIGTTIN
161-sigTTOU   :: CInt
162-sigTTOU   = CONST_SIGTTOU
163-sigUSR1   :: CInt
164-sigUSR1   = CONST_SIGUSR1
165-sigUSR2   :: CInt
166-sigUSR2   = CONST_SIGUSR2
167-sigPOLL   :: CInt
168-sigPOLL   = CONST_SIGPOLL
169-sigPROF   :: CInt
170-sigPROF   = CONST_SIGPROF
171-sigSYS    :: CInt
172-sigSYS    = CONST_SIGSYS
173-sigTRAP   :: CInt
174-sigTRAP   = CONST_SIGTRAP
175-sigURG    :: CInt
176-sigURG    = CONST_SIGURG
177-sigVTALRM :: CInt
178-sigVTALRM = CONST_SIGVTALRM
179-sigXCPU   :: CInt
180-sigXCPU   = CONST_SIGXCPU
181-sigXFSZ   :: CInt
182-sigXFSZ   = CONST_SIGXFSZ
183-
184-internalAbort ::Signal
185-internalAbort = sigABRT
186-
187-realTimeAlarm :: Signal
188-realTimeAlarm = sigALRM
189-
190-busError :: Signal
191-busError = sigBUS
192-
193-processStatusChanged :: Signal
194-processStatusChanged = sigCHLD
195-
196-continueProcess :: Signal
197-continueProcess = sigCONT
198-
199-floatingPointException :: Signal
200-floatingPointException = sigFPE
201-
202-lostConnection :: Signal
203-lostConnection = sigHUP
204-
205-illegalInstruction :: Signal
206-illegalInstruction = sigILL
207-
208-keyboardSignal :: Signal
209-keyboardSignal = sigINT
210-
211-killProcess :: Signal
212-killProcess = sigKILL
213-
214-openEndedPipe :: Signal
215-openEndedPipe = sigPIPE
216-
217-keyboardTermination :: Signal
218-keyboardTermination = sigQUIT
219-
220-segmentationViolation :: Signal
221-segmentationViolation = sigSEGV
222-
223-softwareStop :: Signal
224-softwareStop = sigSTOP
225-
226-softwareTermination :: Signal
227-softwareTermination = sigTERM
228-
229-keyboardStop :: Signal
230-keyboardStop = sigTSTP
231-
232-backgroundRead :: Signal
233-backgroundRead = sigTTIN
234-
235-backgroundWrite :: Signal
236-backgroundWrite = sigTTOU
237-
238-userDefinedSignal1 :: Signal
239-userDefinedSignal1 = sigUSR1
240-
241-userDefinedSignal2 :: Signal
242-userDefinedSignal2 = sigUSR2
243-
244-#if CONST_SIGPOLL != -1
245-pollableEvent :: Signal
246-pollableEvent = sigPOLL
247-#endif
248-
249-profilingTimerExpired :: Signal
250-profilingTimerExpired = sigPROF
251-
252-badSystemCall :: Signal
253-badSystemCall = sigSYS
254-
255-breakpointTrap :: Signal
256-breakpointTrap = sigTRAP
257-
258-urgentDataAvailable :: Signal
259-urgentDataAvailable = sigURG
260-
261-virtualTimerExpired :: Signal
262-virtualTimerExpired = sigVTALRM
263-
264-cpuTimeLimitExceeded :: Signal
265-cpuTimeLimitExceeded = sigXCPU
266-
267-fileSizeLimitExceeded :: Signal
268-fileSizeLimitExceeded = sigXFSZ
269-
270--- -----------------------------------------------------------------------------
271--- Signal-related functions
272-
273--- | @signalProcess int pid@ calls @kill@ to signal process @pid@
274---   with interrupt signal @int@.
275-signalProcess :: Signal -> ProcessID -> IO ()
276-signalProcess sig pid
277- = throwErrnoIfMinus1_ "signalProcess" (c_kill (fromIntegral pid) sig)
278-
279-foreign import ccall unsafe "kill"
280-  c_kill :: CPid -> CInt -> IO CInt
281-
282-
283--- | @signalProcessGroup int pgid@ calls @kill@ to signal
284---  all processes in group @pgid@ with interrupt signal @int@.
285-signalProcessGroup :: Signal -> ProcessGroupID -> IO ()
286-signalProcessGroup sig pgid
287-  = throwErrnoIfMinus1_ "signalProcessGroup" (c_killpg (fromIntegral pgid) sig)
288-
289-foreign import ccall unsafe "killpg"
290-  c_killpg :: CPid -> CInt -> IO CInt
291-
292--- | @raiseSignal int@ calls @kill@ to signal the current process
293---   with interrupt signal @int@.
294-raiseSignal :: Signal -> IO ()
295-raiseSignal sig = throwErrnoIfMinus1_ "raiseSignal" (c_raise sig)
296-
297-#if defined(__GLASGOW_HASKELL__) && (defined(openbsd_HOST_OS) || defined(freebsd_HOST_OS))
298-foreign import ccall unsafe "genericRaise"
299-  c_raise :: CInt -> IO CInt
300-#else
301-foreign import ccall unsafe "raise"
302-  c_raise :: CInt -> IO CInt
303-#endif
304-
305-#ifdef __GLASGOW_HASKELL__
306-data Handler = Default
307-             | Ignore
308-            -- not yet: | Hold
309-             | Catch (IO ())
310-             | CatchOnce (IO ())
311-
312--- | @installHandler int handler iset@ calls @sigaction@ to install an
313---   interrupt handler for signal @int@.  If @handler@ is @Default@,
314---   @SIG_DFL@ is installed; if @handler@ is @Ignore@, @SIG_IGN@ is
315---   installed; if @handler@ is @Catch action@, a handler is installed
316---   which will invoke @action@ in a new thread when (or shortly after) the
317---   signal is received.
318---   If @iset@ is @Just s@, then the @sa_mask@ of the @sigaction@ structure
319---   is set to @s@; otherwise it is cleared.  The previously installed
320---   signal handler for @int@ is returned
321-installHandler :: Signal
322-               -> Handler
323-               -> Maybe SignalSet      -- ^ other signals to block
324-               -> IO Handler           -- ^ old handler
325-
326-#ifdef __PARALLEL_HASKELL__
327-installHandler =
328-  error "installHandler: not available for Parallel Haskell"
329-#else
330-
331-installHandler int handler maybe_mask = do
332-    ensureIOManagerIsRunning  -- for the threaded RTS
333-    case maybe_mask of
334-       Nothing -> install' nullPtr
335-        Just (SignalSet x) -> withForeignPtr x $ install'
336-  where
337-    install' mask =
338-      alloca $ \p_sp -> do
339-
340-      rc <- case handler of
341-             Default      -> stg_sig_install int STG_SIG_DFL p_sp mask
342-             Ignore       -> stg_sig_install int STG_SIG_IGN p_sp mask
343-             Catch m      -> hinstall m p_sp mask int STG_SIG_HAN
344-             CatchOnce m  -> hinstall m p_sp mask int STG_SIG_RST
345-
346-      case rc of
347-       STG_SIG_DFL -> return Default
348-       STG_SIG_IGN -> return Ignore
349-       STG_SIG_ERR -> throwErrno "installHandler"
350-       STG_SIG_HAN -> do
351-               m <- peekHandler p_sp
352-               return (Catch m)
353-       STG_SIG_RST -> do
354-               m <- peekHandler p_sp
355-               return (CatchOnce m)
356-       _other ->
357-          error "internal error: System.Posix.Signals.installHandler"
358-
359-    hinstall m p_sp mask int reset = do
360-      sptr <- newStablePtr m
361-      poke p_sp sptr
362-      stg_sig_install int reset p_sp mask
363-
364-    peekHandler p_sp = do
365-      osptr <- peek p_sp
366-      deRefStablePtr osptr
367-
368-foreign import ccall unsafe
369-  stg_sig_install
370-       :: CInt                         -- sig no.
371-       -> CInt                         -- action code (STG_SIG_HAN etc.)
372-       -> Ptr (StablePtr (IO ()))      -- (in, out) Haskell handler
373-       -> Ptr CSigset                  -- (in, out) blocked
374-       -> IO CInt                      -- (ret) action code
375-
376-#endif /* !__PARALLEL_HASKELL__ */
377-#endif /* __GLASGOW_HASKELL__ */
378-
379--- -----------------------------------------------------------------------------
380--- Alarms
381-
382--- | @scheduleAlarm i@ calls @alarm@ to schedule a real time
383---   alarm at least @i@ seconds in the future.
384-scheduleAlarm :: Int -> IO Int
385-scheduleAlarm secs = do
386-   r <- c_alarm (fromIntegral secs)
387-   return (fromIntegral r)
388-
389-foreign import ccall unsafe "alarm"
390-  c_alarm :: CUInt -> IO CUInt
391-
392-#ifdef __GLASGOW_HASKELL__
393--- -----------------------------------------------------------------------------
394--- The NOCLDSTOP flag
395-
396-foreign import ccall "&nocldstop" nocldstop :: Ptr Int
397-
398--- | Tells the system whether or not to set the @SA_NOCLDSTOP@ flag when
399--- installing new signal handlers.
400-setStoppedChildFlag :: Bool -> IO Bool
401-setStoppedChildFlag b = do
402-    rc <- peek nocldstop
403-    poke nocldstop $ fromEnum (not b)
404-    return (rc == (0::Int))
405-
406--- | Queries the current state of the stopped child flag.
407-queryStoppedChildFlag :: IO Bool
408-queryStoppedChildFlag = do
409-    rc <- peek nocldstop
410-    return (rc == (0::Int))
411-#endif /* __GLASGOW_HASKELL__ */
412-
413--- -----------------------------------------------------------------------------
414--- Manipulating signal sets
415-
416-newtype SignalSet = SignalSet (ForeignPtr CSigset)
417-
418-emptySignalSet :: SignalSet
419-emptySignalSet = unsafePerformIO $ do
420-  fp <- mallocForeignPtrBytes sizeof_sigset_t
421-  throwErrnoIfMinus1_ "emptySignalSet" (withForeignPtr fp $ c_sigemptyset)
422-  return (SignalSet fp)
423-
424-fullSignalSet :: SignalSet
425-fullSignalSet = unsafePerformIO $ do
426-  fp <- mallocForeignPtrBytes sizeof_sigset_t
427-  throwErrnoIfMinus1_ "fullSignalSet" (withForeignPtr fp $ c_sigfillset)
428-  return (SignalSet fp)
429-
430-infixr `addSignal`, `deleteSignal`
431-addSignal :: Signal -> SignalSet -> SignalSet
432-addSignal sig (SignalSet fp1) = unsafePerformIO $ do
433-  fp2 <- mallocForeignPtrBytes sizeof_sigset_t
434-  withForeignPtr fp1 $ \p1 ->
435-    withForeignPtr fp2 $ \p2 -> do
436-      copyBytes p2 p1 sizeof_sigset_t
437-      throwErrnoIfMinus1_ "addSignal" (c_sigaddset p2 sig)
438-  return (SignalSet fp2)
439-
440-deleteSignal :: Signal -> SignalSet -> SignalSet
441-deleteSignal sig (SignalSet fp1) = unsafePerformIO $ do
442-  fp2 <- mallocForeignPtrBytes sizeof_sigset_t
443-  withForeignPtr fp1 $ \p1 ->
444-    withForeignPtr fp2 $ \p2 -> do
445-      copyBytes p2 p1 sizeof_sigset_t
446-      throwErrnoIfMinus1_ "deleteSignal" (c_sigdelset p2 sig)
447-  return (SignalSet fp2)
448-
449-inSignalSet :: Signal -> SignalSet -> Bool
450-inSignalSet sig (SignalSet fp) = unsafePerformIO $
451-  withForeignPtr fp $ \p -> do
452-    r <- throwErrnoIfMinus1 "inSignalSet" (c_sigismember p sig)
453-    return (r /= 0)
454-
455--- | @getSignalMask@ calls @sigprocmask@ to determine the
456---   set of interrupts which are currently being blocked.
457-getSignalMask :: IO SignalSet
458-getSignalMask = do
459-  fp <- mallocForeignPtrBytes sizeof_sigset_t
460-  withForeignPtr fp $ \p ->
461-    throwErrnoIfMinus1_ "getSignalMask" (c_sigprocmask 0 nullPtr p)
462-  return (SignalSet fp)
463-   
464-sigProcMask :: String -> CInt -> SignalSet -> IO ()
465-sigProcMask fn how (SignalSet set) =
466-  withForeignPtr set $ \p_set ->
467-    throwErrnoIfMinus1_ fn (c_sigprocmask how p_set nullPtr)
468-
469--- | @setSignalMask mask@ calls @sigprocmask@ with
470---   @SIG_SETMASK@ to block all interrupts in @mask@.
471-setSignalMask :: SignalSet -> IO ()
472-setSignalMask set = sigProcMask "setSignalMask" (CONST_SIG_SETMASK :: CInt) set
473-
474--- | @blockSignals mask@ calls @sigprocmask@ with
475---   @SIG_BLOCK@ to add all interrupts in @mask@ to the
476---  set of blocked interrupts.
477-blockSignals :: SignalSet -> IO ()
478-blockSignals set = sigProcMask "blockSignals" (CONST_SIG_BLOCK :: CInt) set
479-
480--- | @unblockSignals mask@ calls @sigprocmask@ with
481---   @SIG_UNBLOCK@ to remove all interrupts in @mask@ from the
482---   set of blocked interrupts.
483-unblockSignals :: SignalSet -> IO ()
484-unblockSignals set = sigProcMask "unblockSignals" (CONST_SIG_UNBLOCK :: CInt) set
485-
486--- | @getPendingSignals@ calls @sigpending@ to obtain
487---   the set of interrupts which have been received but are currently blocked.
488-getPendingSignals :: IO SignalSet
489-getPendingSignals = do
490-  fp <- mallocForeignPtrBytes sizeof_sigset_t
491-  withForeignPtr fp $ \p ->
492-   throwErrnoIfMinus1_ "getPendingSignals" (c_sigpending p)
493-  return (SignalSet fp)
494-
495-#ifndef cygwin32_HOST_OS
496-
497--- | @awaitSignal iset@ suspends execution until an interrupt is received.
498--- If @iset@ is @Just s@, @awaitSignal@ calls @sigsuspend@, installing
499--- @s@ as the new signal mask before suspending execution; otherwise, it
500--- calls @pause@.  @awaitSignal@ returns on receipt of a signal.  If you
501--- have installed any signal handlers with @installHandler@, it may be
502--- wise to call @yield@ directly after @awaitSignal@ to ensure that the
503--- signal handler runs as promptly as possible.
504-awaitSignal :: Maybe SignalSet -> IO ()
505-awaitSignal maybe_sigset = do
506-  fp <- case maybe_sigset of
507-         Nothing -> do SignalSet fp <- getSignalMask; return fp
508-         Just (SignalSet fp) -> return fp
509-  withForeignPtr fp $ \p -> do
510-  c_sigsuspend p
511-  return ()
512-  -- ignore the return value; according to the docs it can only ever be
513-  -- (-1) with errno set to EINTR.
514-
515-foreign import ccall unsafe "sigsuspend"
516-  c_sigsuspend :: Ptr CSigset -> IO CInt
517-#endif
518-
519-#ifdef __HUGS__
520-foreign import ccall unsafe "sigdelset"
521-  c_sigdelset   :: Ptr CSigset -> CInt -> IO CInt
522-
523-foreign import ccall unsafe "sigfillset"
524-  c_sigfillset  :: Ptr CSigset -> IO CInt
525-
526-foreign import ccall unsafe "sigismember"
527-  c_sigismember :: Ptr CSigset -> CInt -> IO CInt
528-#else
529-foreign import ccall unsafe "__hscore_sigdelset"
530-  c_sigdelset   :: Ptr CSigset -> CInt -> IO CInt
531-
532-foreign import ccall unsafe "__hscore_sigfillset"
533-  c_sigfillset  :: Ptr CSigset -> IO CInt
534-
535-foreign import ccall unsafe "__hscore_sigismember"
536-  c_sigismember :: Ptr CSigset -> CInt -> IO CInt
537-#endif /* __HUGS__ */
538-
539-foreign import ccall unsafe "sigpending"
540-  c_sigpending :: Ptr CSigset -> IO CInt
541-
542-#endif /* mingw32_HOST_OS */
543-
544rmfile ./System/Posix/Signals.hs
545hunk ./base.cabal 169
546-        System.Posix.Signals,
547}
548
549Context:
550
551[Correct Windows OS name in cabal configuration
552Ian Lynagh <[email protected]>**20070729161739]
553[Use cabal configurations rather than Setup hacks
554Ian Lynagh <[email protected]>**20070729132157]
555[fix Hugs implementation of openTempFile
556Ross Paterson <[email protected]>**20070724114003]
557[Hugs only: avoid dependency cycle
558Ross Paterson <[email protected]>**20070724113852]
559[open(Binary)TempFile is now portable
560Ian Lynagh <[email protected]>**20070722152752]
561[Tweak temporary file filename chooser
562Ian Lynagh <[email protected]>**20070722105445]
563[Move open(Binary)TempFile to System.IO
564Ian Lynagh <[email protected]>**20070722010205]
565[Rename openFd to fdToHandle'
566Ian Lynagh <[email protected]>**20070721235538
567 The name collision with System.Posix.IO.openFd made my brain hurt.
568]
569[Add a test for Data.Map, for a bug on the libraries@ list
570Ian Lynagh <[email protected]>**20070721002119]
571[fix Data.Map.updateAt
572Bertram Felgenhauer <[email protected]>**20070718150340
573 See http://haskell.org/pipermail/libraries/2007-July/007785.html for a piece
574 of code triggering the bug. updateAt threw away parts of the tree making up
575 the map.
576]
577[in hClose, free the handle buffer by replacing it with an empty one
578Simon Marlow <[email protected]>**20070719161419
579 This helps reduce the memory requirements for a closed but unfinalised
580 Handle.
581]
582[Implement GHC.Environment.getFullArgs
583Ian Lynagh <[email protected]>**20070717141918
584 This returns all the arguments, including those normally eaten by the
585 RTS (+RTS ... -RTS).
586 This is mainly for ghc-inplace, where we need to pass /all/ the
587 arguments on to the real ghc. e.g. ioref001(ghci) was failing because
588 the +RTS -K32m -RTS wasn't getting passed on.
589]
590[Define stripPrefix; fixes trac #1464
591Ian Lynagh <[email protected]>**20070714235204]
592[no need to hide Maybe
593[email protected]**20070710154058]
594[Add a more efficient Data.List.foldl' for GHC (from GHC's utils/Util.lhs)
595Ian Lynagh <[email protected]>**20070706205526]
596[Remove include-dirs ../../includes and ../../rts
597Ian Lynagh <[email protected]>**20070705205356
598 We get these by virtue of depending on the rts package.
599]
600[FIX #1131 (newArray_ allocates an array full of garbage)
601Simon Marlow <[email protected]>**20070704102020
602 Now newArray_ returns a deterministic result in the ST monad, and
603 behaves as before in other contexts.  The current newArray_ is renamed
604 to unsafeNewArray_; the MArray class therefore has one more method
605 than before.
606]
607[change nhc98 option from -prelude to --prelude
608[email protected]**20070702150355]
609[Word is a type synonym in nhc98 - so class instance not permitted.
610[email protected]**20070629122035]
611[fix bug in writes to blocking FDs in the non-threaded RTS
612Simon Marlow <[email protected]>**20070628134320]
613[Modernize printf.
614[email protected]**20070628083852
615 
616 Add instances for Int8, Int16, Int32, Int64, Word, Word8, Word16, Word32, and
617 Word64.
618 Handle + flag.
619 Handle X, E, and G formatting characters.
620 Rewrite internals to make it simpler.
621]
622[Speed up number printing and remove the need for Array by using the standard 'intToDigit' routine
623John Meacham <[email protected]>**20070608182353]
624[Use "--  //" (2 spaces) rather than "-- //" (1) to avoid tripping haddock up
625Ian Lynagh <[email protected]>**20070627010930
626 Are we nearly there yet?
627]
628[Use a combination of Haskell/C comments to ensure robustness.
629[email protected]**20070626095222
630 e.g. -- // ensures that _no_ preprocessor will try to tokenise the
631 rest of the line.
632]
633[Change C-style comments to Haskell-style.
634[email protected]**20070625094515
635 These two headers are only ever used for pre-processing Haskell code,
636 and are never seen by any C tools except cpp.  Using the Haskell comment
637 convention means that cpphs no longer needs to be given the --strip
638 option to remove C comments from open code.  This is a Good Thing,
639 because all of /* */ and // are valid Haskell operator names, and there
640 is no compelling reason to forbid using them in files which also happen
641 to have C-preprocessor directives.
642]
643[makefileHook needs to generate PrimopWrappers.hs too
644Simon Marlow <[email protected]>**20070622073424]
645[Hugs now gets MonadFix(mfix) from its prelude
646Ross Paterson <[email protected]>**20070620000343]
647[Typo (consUtils.hs -> consUtils.h)
648Ian Lynagh <[email protected]>**20070619124140]
649[install dependent include files and Typeable.h
650Bertram Felgenhauer <[email protected]>**20070613041734]
651[update prototype following inputReady->fdReady change
652Simon Marlow <[email protected]>**20070614095309]
653[FIX hGetBuf001: cut-and-pasto in readRawBufferNoBlock
654Simon Marlow <[email protected]>**20070614094222]
655[fix description of CWStringLen
656Ross Paterson <[email protected]>**20070605223345]
657[Remove unsafeCoerce-importing kludgery in favor of Unsafe.Coerce
658Isaac Dupree <[email protected]>**20070601203625]
659[--configure-option and --ghc-option are now provided by Cabal
660Ross Paterson <[email protected]>**20070604115233]
661[Data.PackedString: Data.Generics is GHC-only
662Ross Paterson <[email protected]>**20070529232427]
663[Add Data instance for PackedString; patch from greenrd in trac #1263
664Ian Lynagh <[email protected]>**20070529205420]
665[Control.Concurrent documentation fix
666[email protected]**20070524163325]
667[add nhc98-options: field to .cabal file
668[email protected]**20070528122626]
669[add a dummy implementation of System.Timeout.timeout for nhc98
670[email protected]**20070528110309]
671[Add System.Timeout to base.cabal
672Ian Lynagh <[email protected]>**20070527123314
673 Filtered out for non-GHC by Setup.hs.
674]
675[add module Data.Fixed to nhc98 build
676[email protected]**20070525141021]
677[DIRS now lives in package Makefile, not script/pkgdirlist
678[email protected]**20070525111749]
679[delete unused constants
680Ross Paterson <[email protected]>**20070525001741]
681[remove System.Cmd and System.Time too
682[email protected]**20070524163200]
683[remove locale as well
684[email protected]**20070524161943]
685[nhc98 version of instance Show (a->b) copied from Prelude
686[email protected]**20070524160615]
687[remove directory, pretty, and random bits from base for nhc98
688[email protected]**20070524160608]
689[Remove Makefile and package.conf.in (used in the old build system)
690Ian Lynagh <[email protected]>**20070524142545]
691[Split off process package
692Ian Lynagh <[email protected]>**20070523210523]
693[Fix comment: maperrno is in Win32Utils.c, not runProcess.c
694Ian Lynagh <[email protected]>**20070523181331]
695[System.Locale is now split out
696Ian Lynagh <[email protected]>**20070519132638]
697[Split off directory, random and old-time packages
698Ian Lynagh <[email protected]>**20070519120642]
699[Remove Control.Parallel*, now in package parallel
700Ian Lynagh <[email protected]>**20070518165431]
701[Remove the pretty-printing modules (now in package pretty(
702Ian Lynagh <[email protected]>**20070518162521]
703[add install-includes: field
704Simon Marlow <[email protected]>**20070517094948]
705[correct the documentation for newForeignPtr
706Simon Marlow <[email protected]>**20070516082019]
707[When doing safe writes, handle EAGAIN rather than raising an exception
708Simon Marlow <[email protected]>**20070515114615
709 It might be that stdin was set to O_NONBLOCK by someone else, and we
710 should handle this case.  (this happens with GHCi, I'm not quite sure why)
711]
712[Use FilePath to make paths when building GHC/Prim.hs and GHC/PrimopWrappers.hs
713Ian Lynagh <[email protected]>**20070514110409]
714[fix imports for non-GHC
715Ross Paterson <[email protected]>**20070513001138]
716[Give an example of how intersection takes elements from the first set
717Ian Lynagh <[email protected]>**20070512160253]
718[further clarify the docs for 'evaluate'
719[email protected]**20070508101124]
720[improve documentation for evaluate
721Simon Marlow <[email protected]>**20070508081712]
722[FIX: #724 (tee complains if used in a process started by ghc)
723Simon Marlow <[email protected]>**20070507123537
724 
725 Now, we only set O_NONBLOCK on file descriptors that we create
726 ourselves.  File descriptors that we inherit (stdin, stdout, stderr)
727 are kept in blocking mode.  The way we deal with this differs between
728 the threaded and non-threaded runtimes:
729 
730  - with -threaded, we just make a safe foreign call to read(), which
731    may block, but this is ok.
732 
733  - without -threaded, we test the descriptor with select() before
734    attempting any I/O.  This isn't completely safe - someone else
735    might read the data between the select() and the read() - but it's
736    a reasonable compromise and doesn't seem to measurably affect
737    performance.
738]
739[the "unknown" types are no longer required
740Simon Marlow <[email protected]>**20070426135931]
741[Build GHC/Prim.hs and GHC/PrimopWrappers.hs from Cabal
742Ian Lynagh <[email protected]>**20070509142655]
743[Make Control.Exception buildable by nhc98.
744[email protected]**20070504105548
745 The nhc98 does not have true exceptions, but these additions should be
746 enough infrastructure to pretend that it does.  Only IO exceptions will
747 actually work.
748]
749[Trim imports, remove a cycle
750simonpj@microsoft**20070503123010
751 
752 A first attempt at removing gratuitous cycles in the base package.
753 I've removed the useless module GHC.Dynamic, which gets rid of a cycle;
754 and trimmed off various unnecesary imports.
755 
756 This also fixes the IsString import problem.
757 
758]
759[Be less quiet about building the base package
760simonpj@microsoft**20070503093707]
761[Remove Splittable class (a vestige of linear implicit parameters)
762simonpj@microsoft**20070221104329]
763[Add IsString to exports of GHC.Exts
764simonpj@microsoft**20070221104249]
765[tweak documentation as per suggestion from Marc Weber on [email protected]
766Simon Marlow <[email protected]>**20070426075921]
767[Add extra libraries when compiling with GHC on Windows
768Ian Lynagh <[email protected]>**20070424213127]
769[Follow Cabal changes in Setup.hs
770Ian Lynagh <[email protected]>**20070418114345]
771[inclusion of libc.h is conditional on __APPLE__
772[email protected]**20070417085556]
773[MERGE: fix ugly uses of memcpy foreign import inside ST
774Simon Marlow <[email protected]>**20070416101530
775 fixes cg026
776]
777[Fix configure with no --with-cc
778Ian Lynagh <[email protected]>**20070415165143]
779[MacOS 10.3 needs #include <libc.h> as well
780[email protected]**20070414155507]
781[For nhc98 only, use hsc2hs to determine System.Posix.Types.
782[email protected]**20070413155831
783 Avoids the existing autoconf stuff, by introducing an auxiliary module
784 called NHC.PosixTypes that uses hsc2hs, which is then simply re-exported
785 from System.Posix.Types.
786]
787[we need a makefileHook too
788Simon Marlow <[email protected]>**20070413151307]
789[Remove unnecesary SOURCE import of GHC.Err in GHC.Pack
790Ian Lynagh <[email protected]>**20070412235908]
791[add System.Posix.Types to default nhc98 build
792[email protected]**20070412195026]
793[mark System.IO.openTempFile as non-portable in haddocks
794[email protected]**20070412135359]
795[Don't turn on -Werror in Data.Fixed
796Ian Lynagh <[email protected]>**20070411155721
797 This may be responsible for the x86_64/Linux nightly build failing.
798]
799[Fix -Wall warnings
800Ian Lynagh <[email protected]>**20070411004929]
801[Add missing case in removePrefix
802Ian Lynagh <[email protected]>**20070411002537]
803[Allow additional options to pass on to ./configure to be given
804Ian Lynagh <[email protected]>**20070406151856]
805[Hugs only: fix location of unsafeCoerce
806Ross Paterson <[email protected]>**20070406113731]
807[fix isPortableBuild test
808Ross Paterson <[email protected]>**20070406111304]
809[Unsafe.Coerce doesn't need Prelude
810Ian Lynagh <[email protected]>**20070405175930]
811[make Setup and base.cabal suitable for building the libraries with GHC
812Ian Lynagh <[email protected]>**20070308163824]
813[HsByteArray doesn't exist
814Ian Lynagh <[email protected]>**20070404163051]
815[Don't use Fd/FD in foreign decls
816Ian Lynagh <[email protected]>**20070404155822
817 Using CInt makes it much easier to verify that it is right, and we won't
818 get caught out by possible newtype switches between CInt/Int.
819]
820[HsByteArray doesn't exist
821Ian Lynagh <[email protected]>**20070404155732]
822[Fix braino
823Ian Lynagh <[email protected]>**20070404144508]
824[Fix incorrect changes to C types in a foreign import for nhc98.
825[email protected]**20070404120954
826 If we use type CTime, it needs to be imported.  Also, CTime is not an
827 instance of Integral, so use some other mechanism to convert it.
828]
829[Fix C/Haskell type mismatches
830Ian Lynagh <[email protected]>**20070403194943]
831[add new module Unsafe.Coerce to build system
832[email protected]**20070403131333]
833[Fix type mismatches between foreign imports and HsBase.h
834Ian Lynagh <[email protected]>**20070403001611
835 
836 Merge to stable, checking for interface changes.
837]
838[put 'unsafeCoerce' in a standard location
839[email protected]**20061113114103]
840[fix for nhc98 build
841[email protected]**20070402141712]
842[Function crossMapP for fixing desugaring of comprehensions
843Manuel M T Chakravarty <[email protected]>**20070402082906
844 
845 Merge into 6.6 branch.
846]
847[Add min/max handling operations for IntSet/IntMap
848jeanphilippe.bernardy@gmail.com**20070315072352]
849[Monoid instance for Maybe and two wrappers: First and Last. trac proposal #1189
850Jeffrey Yasskin <jyasskin@gmail.com>**20070309062550]
851[Fix the type of wgencat
852Ian Lynagh <igloo@earth.li>**20070329164223]
853[fix strictness of foldr/build rule for take, see #1219
854Simon Marlow <simonmar@microsoft.com>**20070327103941]
855[remove Makefile.inc (only affects nhc98)
856Malcolm.Wallace@cs.york.ac.uk**20070320120057]
857[copyBytes copies bytes, not elements; fixes trac #1203
858Ian Lynagh <igloo@earth.li>**20070312113555]
859[Add ioeGetLocation, ioeSetLocation to System/IO/Error.hs; trac #1191
860Ian Lynagh <igloo@earth.li>**20070304130315]
861[fix race condition in prodServiceThread
862Simon Marlow <simonmar@microsoft.com>**20070307134330
863 See #1187
864]
865[Prevent duplication of unsafePerformIO on a multiprocessor
866Simon Marlow <simonmar@microsoft.com>**20070306145424
867 Fixes #986.  The idea is to add a new operation
868 
869   noDuplicate :: IO ()
870 
871 it is guaranteed that if two threads have executed noDuplicate, then
872 they are not duplicating any computation.
873 
874 We now provide two new unsafe operations:
875 
876 unsafeDupablePerformIO    :: IO a -> a
877 unsafeDupableInterleaveIO :: IO a -> IO a
878 
879 which are equivalent to the old unsafePerformIO and unsafeInterleaveIO
880 respectively.  The new versions of these functions are defined as:
881 
882 unsafePerformIO    m = unsafeDupablePerformIO (noDuplicate >> m)
883 unsafeInterleaveIO m = unsafeDupableInterleaveIO (noDuplicate >> m)
884]
885[expand docs for forkOS
886Simon Marlow <simonmar@microsoft.com>**20070305160921]
887[document timeout limitations
888Peter Simons <simons@cryp.to>**20070228223540]
889[So many people were involved in the writing of this module that
890Peter Simons <simons@cryp.to>**20070228223415
891 it feels unfair to single anyone out as the lone copyright
892 holder.
893]
894[This patch adds a timeout function to the base libraries. Trac #980 is
895Peter Simons <simons@cryp.to>**20070126222615
896 concerned with this issue. The design guideline for this implementation
897 is that 'timeout N E' should behave exactly the same as E as long as E
898 doesn't time out. In our implementation, this means that E has the same
899 myThreadId it would have without the timeout wrapper. Any exception E
900 might throw cancels the timeout and propagates further up. It also
901 possible for E to receive exceptions thrown to it by another thread.
902]
903[PArr: fixed permutations
904Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20070305055807]
905[Add Data.String, containing IsString(fromString); trac proposal #1126
906Ian Lynagh <igloo@earth.li>**20070130134841
907 This is used by the overloaded strings extension (-foverloaded-strings in GHC).
908]
909[GHC.PArr: add bounds checking
910Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20070302053224]
911[Bump nhc98 stack size for System/Time.hsc
912sven.panne@aedion.de**20070301153009]
913[FDs are CInts now, fixing non-GHC builds
914sven.panne@aedion.de**20070225105620]
915[Fixed PArr.dropP
916Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20070222032405
917 - Thanks to Audrey Tang for the bug report
918]
919[Keep the same FD in both halves of a duplex handle when dup'ing
920Ian Lynagh <igloo@earth.li>**20070220141039
921 Otherwise we only close one of the FDs when closing the handle.
922 Fixes trac #1149.
923]
924[Remove more redundant FD conversions
925Ian Lynagh <igloo@earth.li>**20070220092520]
926[Fix FD changes on Windows
927Ian Lynagh <igloo@earth.li>**20070220091516]
928[Consistently use CInt rather than Int for FDs
929Ian Lynagh <igloo@earth.li>**20070219233854]
930[Fix the types of minView/maxView (ticket #1134)
931jeanphilippe.bernardy@gmail.com**20070210065115]
932[fix for hashString, from Jan-Willem Maessen (see #1137)
933Simon Marlow <simonmar@microsoft.com>**20070215094304
934 
935]
936[fix to getUSecOfDay(): arithmetic was overflowing
937Simon Marlow <simonmar@microsoft.com>**20070214161719]
938[The Windows counterpart to 'wrapround of thread delays'
939Ian Lynagh <igloo@earth.li>**20070209173510]
940[wrapround of thread delays
941Neil Davies <SemanticPhilosopher@gmail.com>**20070129160519
942 
943   * made the wrapround of the underlying O/S occur before the wrapround
944     of the delayed threads by making threads delay in microseconds since
945     O/S epoch (1970 - Unix, 1601 - Windows) stored in Word64.
946   * removed redundant calls reading O/S realtime clock
947   * removed rounding to 1/50th of sec for timers
948   * Only for Unix version of scheduler.
949]
950[Whitespace changes only
951Ian Lynagh <igloo@earth.li>**20070206232722]
952[Add some type sigs
953Ian Lynagh <igloo@earth.li>**20070206232439]
954[Use static inline rather than extern inline/inline
955Ian Lynagh <igloo@earth.li>**20070205203628
956 I understand this is more portable, and it also fixes warnings when
957 C things we are wrapping are themselves static inlines (which FD_ISSET
958 is on ppc OS X).
959]
960[add derived instances for Dual monoid
961Ross Paterson <ross@soi.city.ac.uk>**20070202190847]
962[add doc pointers to Foldable
963Ross Paterson <ross@soi.city.ac.uk>**20070202110931
964 
965 Could be applied to STABLE.
966]
967[Eliminate some warnings
968Ian Lynagh <igloo@earth.li>**20060729220854
969 Eliminate warnings in the libraries caused by mixing pattern matching
970 with numeric literal matching.
971]
972[Remove IsString(fromString) from the Prelude
973Ian Lynagh <igloo@earth.li>**20070130124136]
974[Add Kleisli composition
975Don Stewart <dons@cse.unsw.edu.au>**20061113015442]
976[IsString is GHC-only (so why is it in the Prelude?)
977Ross Paterson <ross@soi.city.ac.uk>**20070123183007]
978[Applicative and Monad instances for Tree
979Ross Paterson <ross@soi.city.ac.uk>**20070115174510]
980[Add IsString class for overloaded string literals.
981lennart@augustsson.net**20061221210532]
982[Added examples, more detailed documentation to Data.List Extracting sublists functions
983Andriy Palamarchuk <apa3a@yahoo.com>**20061204164710]
984[fix threadDelay
985Simon Marlow <simonmar@microsoft.com>**20070117091702
986 In "Add support for the IO manager thread" I accidentally spammed part
987 of "Make sure the threaded threadDelay sleeps at least as long as it
988 is asked", which is why the ThreadDelay001 test has been failing.
989]
990[update section on "blocking"
991Simon Marlow <simonmar@microsoft.com>**20070116124328]
992[Fix crash with   (minBound :: Int*) `div (-1)   as result is maxBound + 1.
993Ian Lynagh <igloo@earth.li>**20070115142005]
994[version of example using Tomasz Zielonka's technique
995Ross Paterson <ross@soi.city.ac.uk>**20070105175907]
996[Added Unknowns for higher kinds
997Pepe Iborra <mnislaih@gmail.com>**20061108155938]
998[Improved the Show instance for Unknown
999Pepe Iborra <mnislaih@gmail.com>**20060813111816]
1000[Show instance for GHC.Base.Unknown
1001mnislaih@gmail.com**20060801233530]
1002[Introduce Unknowns for the closure viewer. Add breakpointCond which was missing
1003mnislaih@gmail.com**20060725174537]
1004[Fix missing comma in Fractional documentation
1005Alec Berryman <alec@thened.net>**20061201173237]
1006[Mention that throwTo does not guarantee promptness of delivery
1007simonpj@microsoft**20061211123215]
1008[Add note about synhronous delivery of throwTo
1009simonpj@microsoft**20061211122257]
1010[documentation for installHandler
1011Simon Marlow <simonmar@microsoft.com>**20061205154927
1012 merge to 6.6
1013]
1014[dos2unix
1015Simon Marlow <simonmar@microsoft.com>**20061204095439]
1016[don't try to compile this on Unix
1017Simon Marlow <simonmar@microsoft.com>**20061204095427]
1018[TAG 6.6 release
1019Ian Lynagh <igloo@earth.li>**20061011124740]
1020[TAG Version 2.1
1021Ian Lynagh <igloo@earth.li>**20061009114014]
1022[Bump version number
1023Ian Lynagh <igloo@earth.li>**20061009114009]
1024[Add support for the IO manager thread on Windows
1025Simon Marlow <simonmar@microsoft.com>**20061201152042
1026 Fixes #637.  The test program in that report now works for me with
1027 -threaded, but it doesn't work without -threaded (I don't know if
1028 that's new behaviour or not, though).
1029]
1030[deriving (Eq, Ord, Enum, Show, Read, Typeab) for ConsoleEvent
1031Simon Marlow <simonmar@microsoft.com>**20061201144032]
1032[Make sure the threaded threadDelay sleeps at least as long as it is asked to
1033Ian Lynagh <igloo@earth.li>**20061128204807]
1034[Add comments about argument order to the definitions of gmapQ and constrFields
1035simonpj@microsoft**20061124164505]
1036[Hugs: add Control.Parallel.Strategies
1037Ross Paterson <ross@soi.city.ac.uk>**20061124161039]
1038[Move instance of Show Ptr to Ptr.hs (fewer orphans)
1039simonpj@microsoft.com**20061124100639]
1040[Add type signatures
1041simonpj@microsoft.com**20061124100621]
1042[Add an example of the use of unfoldr, following doc feedback from dozer
1043Don Stewart <dons@cse.unsw.edu.au>**20061124011249]
1044[trim imports
1045Ross Paterson <ross@soi.city.ac.uk>**20061123190352]
1046[Data.Graph is now portable (enable for nhc98)
1047Malcolm.Wallace@cs.york.ac.uk**20061123174913]
1048[remove Data.FunctorM and Data.Queue
1049Ross Paterson <ross@soi.city.ac.uk>**20061112001046
1050 
1051 These were deprecated in 6.6, and can thus be removed in 6.8.
1052]
1053[make Data.Graph portable (no change to the interface)
1054Ross Paterson <ross@soi.city.ac.uk>**20061122010040
1055 
1056 The algorithm now uses STArrays on GHC and IntSets elsewhere.
1057 (Hugs has STArrays, but avoiding them saves a -98, and boxed arrays
1058 aren't fast under Hugs anyway.)
1059]
1060[One less unsafeCoerce# in the tree
1061Don Stewart <dons@cse.unsw.edu.au>**20061120120242]
1062[typo in comment
1063Ross Paterson <ross@soi.city.ac.uk>**20061120115106]
1064[fix shift docs to match ffi spec
1065Ross Paterson <ross@soi.city.ac.uk>**20061117003144]
1066[(nhc98) use new primitive implementations of h{Put,Get}Buf.
1067Malcolm.Wallace@cs.york.ac.uk**20061116173104]
1068[The wrong 'cycle' was exported from Data.ByteString.Lazy.Char8, spotted by sjanssen
1069Don Stewart <dons@cse.unsw.edu.au>**20061110021311]
1070[LPS chunk sizes should be 16 bytes, not 17.
1071Don Stewart <dons@cse.unsw.edu.au>**20061110021254]
1072[Update comments on Prelude organisation in GHC/Base.lhs
1073Ian Lynagh <igloo@earth.li>**20061115001926]
1074[Control.Parallel.Strategies clean-up: Added export list to avoid exporting seq, fixed import list strangeness that haddock choked on, and moved the deprecated functions to a separate section.
1075bringert@cs.chalmers.se**20061113224202]
1076[Control.Parallel.Strategies: added NFData instances for Data.Int.*, Data.Word.*, Maybe, Either, Map, Set, Tree, IntMap, IntSet.
1077bringert@cs.chalmers.se**20061113221843]
1078[Control.Parallel.Strategies: deprecate sPar, sSeq, Assoc, fstPairFstList, force and sforce.
1079bringert@cs.chalmers.se**20061113215219
1080 Code comments indicated that sPar and sSeq have been superceded by sparking and demanding, and that Assoc, fstPairFstList, force and sforce are examples and hacks needed by the Lolita system.
1081]
1082[add Control.Monad.Instances to nhc98 build
1083Malcolm.Wallace@cs.york.ac.uk**20061113113221]
1084[Control.Parallel.Strategies: clarified documentation of parListChunk.
1085bringert@cs.chalmers.se**20061112232904]
1086[Added and cleaned up Haddock comments in Control.Parallel.Strategies.
1087bringert@cs.chalmers.se**20061112220445
1088 Many of the definitions in Control.Parallel.Strategies had missing or unclear Haddock comments. I converted most of the existing plain code comments to haddock comments, added some missing documentation and cleaned up the existing Haddock mark-up.
1089]
1090[Fix broken pragmas; spotted by Bulat Ziganshin
1091Ian Lynagh <igloo@earth.li>**20061111205916]
1092[add doc link to bound threads section
1093Ross Paterson <ross@soi.city.ac.uk>**20060929103252]
1094[hide Data.Array.IO.Internals
1095Ross Paterson <ross@soi.city.ac.uk>**20061111113248
1096 
1097 It's hidden from haddock, and everything it exports is re-exported by
1098 Data.Array.IO.
1099]
1100[add Data.Function
1101Malcolm.Wallace@cs.york.ac.uk**20061110142710]
1102[add Data.Function
1103Ross Paterson <ross@soi.city.ac.uk>**20061110141354]
1104[whitespace only
1105Ross Paterson <ross@soi.city.ac.uk>**20061110141326]
1106[move fix to Data.Function
1107Ross Paterson <ross@soi.city.ac.uk>**20061110141120]
1108[import Prelude
1109Ross Paterson <ross@soi.city.ac.uk>**20061110140445]
1110[Added Data.Function (Trac ticket #979).
1111Nils Anders Danielsson <nad@cs.chalmers.se>**20061110122503
1112 + A module with simple combinators working solely on and with
1113   functions.
1114 + The only new function is "on".
1115 + Some functions from the Prelude are re-exported.
1116]
1117[__hscore_long_path_size is not portable beyond GHC
1118Malcolm.Wallace@cs.york.ac.uk**20061110113222]
1119[redefine writeFile and appendFile using withFile
1120Ross Paterson <ross@soi.city.ac.uk>**20061107140359]
1121[add withFile and withBinaryFile (#966)
1122Ross Paterson <ross@soi.city.ac.uk>**20061107134510]
1123[remove conflicting import for nhc98
1124Malcolm.Wallace@cs.york.ac.uk**20061108111215]
1125[Add intercalate to Data.List (ticket #971)
1126Josef Svenningsson <josef.svenningsson@gmail.com>**20061102122052]
1127[non-GHC: fix canonicalizeFilePath
1128Ross Paterson <ross@soi.city.ac.uk>**20061107133902
1129 
1130 I've also removed the #ifdef __GLASGOW_HASKELL__ from the proper
1131 Windows versions of a few functions.  These will need testing with
1132 Hugs on Windows.
1133]
1134[enable canonicalizePath for non-GHC platforms
1135Simon Marlow <simonmar@microsoft.com>**20061107121141]
1136[Update documentation for hWaitForInput
1137Simon Marlow <simonmar@microsoft.com>**20061107111430
1138 See #972
1139 Merge to 6.6 branch.
1140]
1141[Use unchecked shifts to implement Data.Bits.rotate
1142Samuel Bronson <naesten@gmail.com>**20061012125553
1143 This should get rid of those cases, maybe lower the size enough that the inliner will like it?
1144]
1145[fix Haddock module headers
1146Ross Paterson <ross@soi.city.ac.uk>**20061106124140]
1147[fix example in docs
1148Ross Paterson <ross@soi.city.ac.uk>**20061106115628]
1149[Add intercalate and split to Data.List
1150Josef Svenningsson <josef.svenningsson@gmail.com>*-20061024172357]
1151[Data.Generics.Basics is GHC-only
1152Ross Paterson <ross@soi.city.ac.uk>**20061102111736]
1153[#ifdef around non-portable Data.Generics.Basics
1154Malcolm.Wallace@cs.york.ac.uk**20061102103445]
1155[Add deriving Data to Complex
1156simonpj@microsoft**20061101102059]
1157[minor clarification of RandomGen doc
1158Ross Paterson <ross@soi.city.ac.uk>**20061030230842]
1159[rearrange docs a bit
1160Ross Paterson <ross@soi.city.ac.uk>**20061030161223]
1161[Add intercalate and split to Data.List
1162Josef Svenningsson <josef.svenningsson@gmail.com>**20061024172357]
1163[Export pseq from Control.Parallel, and use it in Control.Parallel.Strategies
1164Simon Marlow <simonmar@microsoft.com>**20061027150141]
1165[`par` should be infixr 0
1166Simon Marlow <simonmar@microsoft.com>**20061027130800
1167 Alas, I didn't spot this due to lack of testing, and the symptom is
1168 that an expression like x `par` y `seq z will have exactly the wrong
1169 parallelism properties.  The workaround is to add parantheses.
1170 
1171 I think we could push this to the 6.6 branch.
1172]
1173[fix example in comment
1174Ross Paterson <ross@soi.city.ac.uk>**20061023163925]
1175[Use the new Any type for dynamics (GHC only)
1176simonpj@microsoft**20061019160408]
1177[add Data.Sequence to nhc98 build
1178Malcolm.Wallace@cs.york.ac.uk**20061012135200]
1179[Remove Data.FiniteMap, add Control.Applicative, Data.Traversable, and
1180Malcolm.Wallace@cs.york.ac.uk**20061012095605
1181 Data.Foldable to the nhc98 build.
1182]
1183[STM invariants
1184tharris@microsoft.com**20061007123253]
1185[Inline shift in GHC's Bits instances for {Int,Word}{,8,16,32,64}
1186Samuel Bronson <naesten@gmail.com>**20061009020906]
1187[Don't create GHC.Prim when bootstrapping; we can't, and we don't need it
1188Ian Lynagh <igloo@earth.li>**20061004165355]
1189[Data.ByteString: fix lazyness of take, drop & splitAt
1190Don Stewart <dons@cse.unsw.edu.au>**20061005011703
1191 
1192 ByteString.Lazy's take, drop and splitAt were too strict when demanding
1193 a byte string. Spotted by Einar Karttunen. Thanks to him and to Bertram
1194 Felgenhauer for explaining the problem and the fix.
1195 
1196]
1197[Fix syntax error that prevents building Haddock documentation on Windows
1198brianlsmith@gmail.com**20060917013530]
1199[Hugs only: unbreak typeRepKey
1200Ross Paterson <ross@soi.city.ac.uk>**20060929102743]
1201[make hGetBufNonBlocking do something on Windows w/ -threaded
1202Simon Marlow <simonmar@microsoft.com>**20060927145811
1203 hGetBufNonBlocking will behave the same as hGetBuf on Windows now, which
1204 is better than just crashing (which it did previously).
1205]
1206[add typeRepKey :: TypeRep -> IO Int
1207Simon Marlow <simonmar@microsoft.com>**20060927100342
1208 See feature request #880
1209]
1210[fix header comment
1211Ross Paterson <ross@soi.city.ac.uk>**20060926135843]
1212[Add strict versions of insertWith and insertWithKey (Data.Map)
1213jeanphilippe.bernardy@gmail.com**20060910162443]
1214[doc tweaks, including more precise equations for evaluate
1215Ross Paterson <ross@soi.city.ac.uk>**20060910115259]
1216[Sync Data.ByteString with stable branch
1217Don Stewart <dons@cse.unsw.edu.au>**20060909050111
1218 
1219 This patch:
1220     * hides the LPS constructor (its in .Base if you need it)
1221     * adds functions to convert between strict and lazy bytestrings
1222     * and adds readInteger
1223 
1224]
1225[Typeable1 instances for STM and TVar
1226Ross Paterson <ross@soi.city.ac.uk>**20060904231425]
1227[remove obsolete Hugs stuff
1228Ross Paterson <ross@soi.city.ac.uk>**20060904223944]
1229[Cleaner isInfixOf suggestion from Ross Paterson
1230John Goerzen <jgoerzen@complete.org>**20060901143654]
1231[New function isInfixOf that searches a list for a given sublist
1232John Goerzen <jgoerzen@complete.org>**20060831151556
1233 
1234 Example:
1235 
1236 isInfixOf "Haskell" "I really like Haskell." -> True
1237 isInfixOf "Ial" "I really like Haskell." -> False
1238 
1239 This function was first implemented in MissingH as MissingH.List.contains
1240]
1241[Better doc on Data.Map.lookup: explain what the monad is for
1242jeanphilippe.bernardy@gmail.com**20060903133440]
1243[fix hDuplicateTo on Windows
1244Simon Marlow <simonmar@microsoft.com>**20060901150016
1245 deja vu - I'm sure I remember fixing this before...
1246]
1247[Improve documentation of atomically
1248simonpj@microsoft**20060714120207]
1249[Add missing method genRange for StdGen (fixes #794)
1250simonpj@microsoft**20060707151901
1251 
1252        MERGE TO STABLE
1253 
1254 Trac #794 reports (correctly) that the implementation of StdGen
1255 only returns numbers in the range (0..something) rather than
1256 (minBound, maxBound), which is what StdGen's genRange claims.
1257 
1258 This commit fixes the problem, by implementing genRange for StdGen
1259 (previously it just used the default method).
1260 
1261 
1262]
1263[mark nhc98 import hack
1264Ross Paterson <ross@soi.city.ac.uk>**20060831125219]
1265[remove some outdated comments
1266Simon Marlow <simonmar@microsoft.com>**20060831104200]
1267[import Control.Arrow.ArrowZero to help nhc98's type checker
1268Malcolm.Wallace@cs.york.ac.uk**20060831101105]
1269[remove Text.Regex(.Posix) from nhc98 build
1270Malcolm.Wallace@cs.york.ac.uk**20060831101016]
1271[add Data.Foldable.{msum,asum}, plus tweaks to comments
1272Ross Paterson <ross@soi.city.ac.uk>**20060830163521]
1273[fix doc typo
1274Ross Paterson <ross@soi.city.ac.uk>**20060830134123]
1275[add Data.Foldable.{for_,forM_} and Data.Traversable.{for,forM}
1276Ross Paterson <ross@soi.city.ac.uk>**20060830133805
1277 
1278 generalizing Control.Monad.{forM_,forM}
1279]
1280[Make length a good consumer
1281simonpj@microsoft*-20060508142726
1282 
1283 Make length into a good consumer.  Fixes Trac bug #707.
1284 
1285 (Before length simply didn't use foldr.)
1286 
1287]
1288[Add Control.Monad.forM and forM_
1289Don Stewart <dons@cse.unsw.edu.au>**20060824081118
1290 
1291 flip mapM_ is more and more common, I find. Several suggestions have
1292 been made to add this, as foreach or something similar. This patch
1293 does just that:
1294 
1295     forM  :: (Monad m) => [a] -> (a -> m b) -> m [b]
1296     forM_ :: (Monad m) => [a] -> (a -> m b) -> m ()
1297 
1298 So we can write:
1299     
1300     Prelude Control.Monad> forM_ [1..4] $ \x -> print x
1301     1
1302     2
1303     3
1304     4
1305 
1306]
1307[Hide internal module from haddock in Data.ByteString
1308Don Stewart <dons@cse.unsw.edu.au>**20060828011515]
1309[add advice on avoiding import ambiguities
1310Ross Paterson <ross@soi.city.ac.uk>**20060827170407]
1311[expand advice on importing these modules
1312Ross Paterson <ross@soi.city.ac.uk>**20060827164044]
1313[add Haddock marker
1314Ross Paterson <ross@soi.city.ac.uk>**20060827115140]
1315[Clarify how one hides Prelude.catch
1316Don Stewart <dons@cse.unsw.edu.au>**20060826124346
1317 
1318 User feedback indicated that an example was required, of how to hide
1319 Prelude.catch, so add such an example to the docs
1320 
1321]
1322[Workaround for OSes that don't have intmax_t and uintmax_t
1323Ian Lynagh <igloo@earth.li>**20060825134936
1324 OpenBSD (and possibly others) do not have intmax_t and uintmax_t types:
1325     http://www.mail-archive.com/haskell-prime@haskell.org/msg01548.html
1326 so substitute (unsigned) long long if we have them, otherwise
1327 (unsigned) long.
1328 
1329]
1330[add docs for par
1331Simon Marlow <simonmar@microsoft.com>**20060825110610]
1332[document minimal complete definition for Bits
1333Ross Paterson <ross@soi.city.ac.uk>**20060824140504]
1334[C regex library bits have moved to the regex-posix package
1335Simon Marlow <simonmar@microsoft.com>**20060824132311]
1336[Add shared Typeable support (ghc only)
1337Esa Ilari Vuokko <ei@vuokko.info>**20060823003126]
1338[this should have been removed with the previous patch
1339Simon Marlow <simonmar@microsoft.com>**20060824121223]
1340[remove Text.Regx & Text.Regex.Posix
1341Simon Marlow <simonmar@microsoft.com>**20060824094615
1342 These are subsumed by the new regex-base, regex-posix and regex-compat
1343 packages.
1344]
1345[explicitly tag Data.ByteString rules with the FPS prefix.
1346Don Stewart <dons@cse.unsw.edu.au>**20060824041326]
1347[Add spec rules for sections in Data.ByteString
1348Don Stewart <dons@cse.unsw.edu.au>**20060824012611]
1349[Sync Data.ByteString with current stable branch, 0.7
1350Don Stewart <dons@cse.unsw.edu.au>**20060823143338]
1351[add notes about why copyFile doesn't remove the target
1352Simon Marlow <simonmar@microsoft.com>**20060823095059]
1353[copyFile: try removing the target file before opening it for writing
1354Simon Marlow <simonmar@microsoft.com>*-20060822121909]
1355[copyFile: try removing the target file before opening it for writing
1356Simon Marlow <simonmar@microsoft.com>**20060822121909]
1357[add alternative functors and extra instances
1358Ross Paterson <ross@soi.city.ac.uk>**20060821152151
1359 
1360 * Alternative class, for functors with a monoid
1361 * instances for Const
1362 * instances for arrows
1363]
1364[generate Haddock docs on all platforms
1365Simon Marlow <simonmar@microsoft.com>**20060821131612]
1366[remove extra comma from import
1367Ross Paterson <ross@soi.city.ac.uk>**20060819173954]
1368[fix docs for withC(A)StringLen
1369Ross Paterson <ross@soi.city.ac.uk>**20060818170328]
1370[use Haskell'98 compliant indentation in do blocks
1371Malcolm.Wallace@cs.york.ac.uk**20060818130810]
1372[use correct names of IOArray operations for nhc98
1373Malcolm.Wallace@cs.york.ac.uk**20060818130714]
1374[add mapMaybe and mapEither, plus WithKey variants
1375Ross Paterson <ross@soi.city.ac.uk>**20060817235041]
1376[remove Text.Html from nhc98 build
1377Malcolm.Wallace@cs.york.ac.uk**20060817135502]
1378[eliminate more HOST_OS tests
1379Ross Paterson <ross@soi.city.ac.uk>**20060815190609]
1380[Hugs only: disable unused process primitives
1381Ross Paterson <ross@soi.city.ac.uk>**20060813184435
1382 
1383 These were the cause of Hugs bug #30, I think, and weren't used by Hugs anyway.
1384]
1385[markup fix to Data.HashTable
1386Ross Paterson <ross@soi.city.ac.uk>**20060812103835]
1387[revert removal of ghcconfig.h from package.conf.in
1388Ross Paterson <ross@soi.city.ac.uk>**20060812082702
1389 
1390 as it's preprocessed with -undef (pointed out by Esa Ilari Vuokko)
1391]
1392[fix Data.HashTable for non-GHC
1393Ross Paterson <ross@soi.city.ac.uk>**20060811231521]
1394[remove deprecated 'withObject'
1395Simon Marlow <simonmar@microsoft.com>**20060811152350]
1396[Jan-Willem Maessen's improved implementation of Data.HashTable
1397Simon Marlow <simonmar@microsoft.com>**20060811151024
1398 Rather than incrementally enlarging the hash table, this version
1399 just does it in one go when the table gets too full.
1400]
1401[Warning police: Make some prototypes from the RTS known
1402sven.panne@aedion.de**20060811144629]
1403[Warning police: Removed useless catch-all clause
1404sven.panne@aedion.de**20060811142208]
1405[reduce dependency on ghcconfig.h
1406Ross Paterson <ross@soi.city.ac.uk>**20060811124030
1407 
1408 The only remaining use is in cbits/dirUtils.h, which tests solaris2_HOST_OS
1409 
1410 (Also System.Info uses ghcplatform.h and several modules import MachDeps.h
1411 to get SIZEOF_* and ALIGNMENT_* from ghcautoconf.h)
1412]
1413[(non-GHC only) track MArray interface change
1414Ross Paterson <ross@soi.city.ac.uk>**20060810182902]
1415[move Text.Html to a separate package
1416Simon Marlow <simonmar@microsoft.com>**20060810113017]
1417[bump version to 2.0
1418Simon Marlow <simonmar@microsoft.com>**20060810112833]
1419[Remove deprecated Data.FiniteMap and Data.Set interfaces
1420Simon Marlow <simonmar@microsoft.com>**20060809153810]
1421[move altzone test from ghc to base package
1422Ross Paterson <ross@soi.city.ac.uk>**20060809124259]
1423[remove unnecessary #include "ghcconfig.h"
1424Ross Paterson <ross@soi.city.ac.uk>**20060809123812]
1425[Change the API of MArray to allow resizable arrays
1426Simon Marlow <simonmar@microsoft.com>**20060809100548
1427 See #704
1428 
1429 The MArray class doesn't currently allow a mutable array to change its
1430 size, because of the pure function
1431 
1432   bounds :: (HasBounds a, Ix i) => a i e -> (i,i)
1433 
1434 This patch removes the HasBounds class, and adds
1435 
1436   getBounds :: (MArray a e m, Ix i) => a i e -> m (i,i)
1437 
1438 to the MArray class, and
1439 
1440   bounds :: (IArray a e, Ix i) => a i e -> (i,i)
1441 
1442 to the IArray class.
1443 
1444 The reason that bounds had to be incorporated into the IArray class is
1445 because I couldn't make DiffArray work without doing this.  DiffArray
1446 acts as a layer converting an MArray into an IArray, and there was no
1447 way (that I could find) to define an instance of HasBounds for
1448 DiffArray.
1449]
1450[deprecate this module.
1451Simon Marlow <simonmar@microsoft.com>**20060808100708]
1452[add traceShow (see #474)
1453Simon Marlow <simonmar@microsoft.com>**20060807155545]
1454[remove spurious 'extern "C" {'
1455Simon Marlow <simonmar@microsoft.com>**20060724160258]
1456[Fix unsafeIndex for large ranges
1457Simon Marlow <simonmar@microsoft.com>**20060721100225]
1458[disambiguate uses of foldr for nhc98 to compile without errors
1459Malcolm.Wallace@cs.york.ac.uk**20060711161614]
1460[make Control.Monad.Instances compilable by nhc98
1461Malcolm.Wallace@cs.york.ac.uk**20060711160941]
1462[breakpointCond
1463Lemmih <lemmih@gmail.com>**20060708055528]
1464[UNDO: Merge "unrecognized long opt" fix from 6.4.2
1465Simon Marlow <simonmar@microsoft.com>**20060705142537
1466 This patch undid the previous patch, "RequireOrder: do not collect
1467 unrecognised options after a non-opt".  I asked Sven to revert it, but
1468 didn't get an answer.
1469 
1470 See bug #473.
1471]
1472[Avoid strictness in accumulator for unpackFoldr
1473Don Stewart <dons@cse.unsw.edu.au>**20060703091806
1474 
1475 The seq on the accumulator for unpackFoldr will break in the presence of
1476 head/build rewrite rules. The empty list case will be forced, producing
1477 an exception. This is a known issue with seq and rewrite rules that we
1478 just stumbled on to.
1479 
1480]
1481[Disable unpack/build fusion
1482Don Stewart <dons@cse.unsw.edu.au>**20060702083913
1483 
1484 unpack/build on bytestrings seems to trigger a bug when interacting with
1485 head/build fusion in GHC.List. The bytestring001 testcase catches it.
1486 
1487 I'll investigate further, but best to disable this for now (its not
1488 often used anyway).
1489 
1490 Note that with -frules-off or ghc 6.4.2 things are fine. It seems to
1491 have emerged with the recent rules changes.
1492 
1493]
1494[Import Data.ByteString.Lazy, improve ByteString Fusion, and resync with FPS head
1495Don Stewart <dons@cse.unsw.edu.au>**20060701084345
1496 
1497 This patch imports the Data.ByteString.Lazy module, and its helpers,
1498 providing a ByteString implemented as a lazy list of strict cache-sized
1499 chunks. This type allows the usual lazy operations to be written on
1500 bytestrings, including lazy IO, with much improved space and time over
1501 the [Char] equivalents.
1502 
1503]
1504[Wibble in docs for new ForeignPtr functionsn
1505Don Stewart <dons@cse.unsw.edu.au>**20060609075924]
1506[comments for Applicative and Traversable
1507Ross Paterson <ross@soi.city.ac.uk>**20060622170436]
1508[default to NoBuffering on Windows for a read/write text file
1509Simon Marlow <simonmar@microsoft.com>**20060622144446
1510 Fixes (works around) #679
1511]
1512[remove dead code
1513Simon Marlow <simonmar@microsoft.com>**20060622144433]
1514[clarify and expand docs
1515Simon Marlow <simonmar@microsoft.com>**20060622112911]
1516[Add minView and maxView to Map and Set
1517jeanphilippe.bernardy@gmail.com**20060616180121]
1518[add signature for registerDelay
1519Ross Paterson <ross@soi.city.ac.uk>**20060614114456]
1520[a few doc comments
1521Ross Paterson <ross@soi.city.ac.uk>**20060613142704]
1522[Optimised foreign pointer representation, for heap-allocated objects
1523Don Stewart <dons@cse.unsw.edu.au>**20060608015011]
1524[Add the inline function, and many comments
1525simonpj@microsoft.com**20060605115814
1526 
1527 This commit adds the 'inline' function described in the
1528 related patch in the compiler.
1529 
1530 I've also added comments about the 'lazy' function.
1531 
1532]
1533[small intro to exceptions
1534Ross Paterson <ross@soi.city.ac.uk>**20060525111604]
1535[export breakpoint
1536Simon Marlow <simonmar@microsoft.com>**20060525090456]
1537[Merge in changes from fps head. Highlights:
1538Don Stewart <dons@cse.unsw.edu.au>**20060525065012
1539 
1540     Wed May 24 15:49:38 EST 2006  sjanssen@cse.unl.edu
1541       * instance Monoid ByteString
1542 
1543     Wed May 24 15:04:04 EST 2006  Duncan Coutts <duncan.coutts@worc.ox.ac.uk>
1544       * Rearange export lists for the .Char8 modules
1545 
1546     Wed May 24 14:59:56 EST 2006  Duncan Coutts <duncan.coutts@worc.ox.ac.uk>
1547       * Implement mapAccumL and reimplement mapIndexed using loopU
1548 
1549     Wed May 24 14:47:32 EST 2006  Duncan Coutts <duncan.coutts@worc.ox.ac.uk>
1550       * Change the implementation of the unfoldr(N) functions.
1551       Use a more compact implementation for unfoldrN and change it's behaviour
1552       to only return Just in the case that it actually 'overflowed' the N, so
1553       the boundary case of unfolding exactly N gives Nothing.
1554       Implement unfoldr and Lazy.unfoldr in terms of unfoldrN. Use fibonacci
1555       growth for the chunk size in unfoldr
1556 
1557     Wed May 24 08:32:29 EST 2006  sjanssen@cse.unl.edu
1558       * Add unfoldr to ByteString and .Char8
1559       A preliminary implementation of unfoldr.
1560 
1561     Wed May 24 01:39:41 EST 2006  Duncan Coutts <duncan.coutts@worc.ox.ac.uk>
1562       * Reorder the export lists to better match the Data.List api
1563 
1564     Tue May 23 14:04:32 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
1565       * pack{Byte,Char} -> singleton. As per fptools convention
1566 
1567     Tue May 23 14:00:51 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
1568       * elemIndexLast -> elemIndexEnd
1569 
1570     Tue May 23 13:57:34 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
1571       * In the search for a more orthogonal api, we kill breakFirst/breakLast,
1572         which were of dubious value
1573 
1574     Tue May 23 12:24:09 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
1575       * Abolish elems. It's name implied it was unpack, but its type didn't. it made no sense
1576 
1577     Tue May 23 10:42:09 EST 2006  Duncan Coutts <duncan.coutts@worc.ox.ac.uk>
1578       * Minor doc tidyup. Use haddock markup better.
1579 
1580     Tue May 23 11:00:31 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
1581       * Simplify the join() implementation. Spotted by Duncan.
1582 
1583]
1584[add a way to ask the IO manager thread to exit
1585Simon Marlow <simonmar@microsoft.com>**20060524121823]
1586[Sync with FPS head, including the following patches:
1587Don Stewart <dons@cse.unsw.edu.au>**20060520030436
1588         
1589     Thu May 18 15:45:46 EST 2006  sjanssen@cse.unl.edu
1590       * Export unsafeTake and unsafeDrop
1591 
1592     Fri May 19 11:53:08 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
1593       * Add foldl1'
1594 
1595     Fri May 19 13:41:24 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
1596       * Add fuseable scanl, scanl1 + properties
1597 
1598     Fri May 19 18:20:40 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
1599       * Spotted another chance to use unsafeTake,Drop (in groupBy)
1600 
1601     Thu May 18 09:24:25 EST 2006  Duncan Coutts <duncan.coutts@worc.ox.ac.uk>
1602       * More effecient findIndexOrEnd based on the impl of findIndex
1603 
1604     Thu May 18 09:22:49 EST 2006  Duncan Coutts <duncan.coutts@worc.ox.ac.uk>
1605       * Eliminate special case in findIndex since it's handled anyway.
1606 
1607     Thu May 18 09:19:08 EST 2006  Duncan Coutts <duncan.coutts@worc.ox.ac.uk>
1608       * Add unsafeTake and unsafeDrop
1609       These versions assume the n is in the bounds of the bytestring, saving
1610       two comparison tests. Then use them in varous places where we think this
1611       holds. These cases need double checking (and there are a few remaining
1612       internal uses of take / drop that might be possible to convert).
1613       Not exported for the moment.
1614 
1615     Tue May 16 23:15:11 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
1616       * Handle n < 0 in drop and splitAt. Spotted by QC.
1617 
1618     Tue May 16 22:46:22 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
1619       * Handle n <= 0 cases for unfoldr and replicate. Spotted by QC
1620 
1621     Tue May 16 21:34:11 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
1622       * mapF -> map', filterF -> filter'
1623 
1624]
1625[haddock fix
1626Ross Paterson <ross@soi.city.ac.uk>**20060518154723]
1627[simplify indexing in Data.Sequence
1628Ross Paterson <ross@soi.city.ac.uk>**20060518154316]
1629[Move Eq, Ord, Show instances for ThreadId to GHC.Conc
1630Simon Marlow <simonmar@microsoft.com>**20060518113339
1631 Eliminates orphans.
1632]
1633[Better error handling in the IO manager thread
1634Simon Marlow <simonmar@microsoft.com>**20060518113303
1635 In particular, handle EBADF just like rts/posix/Select.c, by waking up
1636 all the waiting threads.  Other errors are thrown, instead of just
1637 being ignored.
1638]
1639[#define _REENTRANT 1  (needed to get the right errno on some OSs)
1640Simon Marlow <simonmar@microsoft.com>**20060518104151
1641 Part 2 of the fix for threaded RTS problems on Solaris and possibly
1642 *BSD (Part 1 was the same change in ghc/includes/Rts.h).
1643]
1644[copyCString* should be in IO. Spotted by Tomasz Zielonka
1645Don Stewart <dons@cse.unsw.edu.au>**20060518012154]
1646[add import Prelude to get dependencies right for Data/Fixed.hs
1647Duncan Coutts <duncan.coutts@worc.ox.ac.uk>**20060517222044
1648 Hopefully this fixes parallel builds.
1649]
1650[Fix negative index handling in splitAt, replicate and unfoldrN. Move mapF, filterF -> map', filter' while we're here
1651Don Stewart <dons@cse.unsw.edu.au>**20060517020150]
1652[Use our own realloc. Thus reduction functions (like filter) allocate on the Haskell heap. Makes around 10% difference.
1653Don Stewart <dons@cse.unsw.edu.au>**20060513051736]
1654[Last two CInt fixes for 64 bit, and bracket writeFile while we're here
1655Don Stewart <dons@cse.unsw.edu.au>**20060512050750]
1656[Some small optimisations, generalise the type of unfold
1657Don Stewart <dons@cse.unsw.edu.au>**20060510043309
1658 
1659     Tue May  9 22:36:29 EST 2006  Duncan Coutts <duncan.coutts@worc.ox.ac.uk>
1660       * Surely the error function should not be inlined.
1661 
1662     Tue May  9 22:35:53 EST 2006  Duncan Coutts <duncan.coutts@worc.ox.ac.uk>
1663       * Reorder memory writes for better cache locality.
1664 
1665     Tue May  9 23:28:09 EST 2006  Duncan Coutts <duncan.coutts@worc.ox.ac.uk>
1666       * Generalise the type of unfoldrN
1667       
1668       The type of unfoldrN was overly constrained:
1669       unfoldrN :: Int -> (Word8 -> Maybe (Word8, Word8)) -> Word8 -> ByteString
1670       
1671       if we compare that to unfoldr:
1672       unfoldr :: (b -> Maybe (a, b)) -> b -> [a]
1673       
1674       So we can generalise unfoldrN to this type:
1675       unfoldrN :: Int -> (a -> Maybe (Word8, a)) -> a -> ByteString
1676       
1677       and something similar for the .Char8 version. If people really do want to
1678       use it a lot with Word8/Char then perhaps we should add a specialise pragma.
1679 
1680     Wed May 10 13:26:40 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
1681       * Add foldl', and thus a fusion rule for length . {map,filter,fold},
1682       that avoids creating an array at all if the end of the pipeline is a 'length' reduction
1683 
1684 **END OF DESCRIPTION***
1685 
1686 Place the long patch description above the ***END OF DESCRIPTION*** marker.
1687 The first line of this file will be the patch name.
1688 
1689 
1690 This patch contains the following changes:
1691 
1692 M ./Data/ByteString.hs -8 +38
1693 M ./Data/ByteString/Char8.hs -6 +12
1694]
1695[portable implementation of WordPtr/IntPtr for non-GHC
1696Ross Paterson <ross@soi.city.ac.uk>**20060510001826
1697 
1698 plus much tweaking of imports to avoid cycles
1699]
1700[add WordPtr and IntPtr types to Foreign.Ptr, with associated conversions
1701Simon Marlow <simonmar@microsoft.com>**20060509092606
1702 
1703 As suggested by John Meacham. 
1704 
1705 I had to move the Show instance for Ptr into GHC.ForeignPtr to avoid
1706 recursive dependencies.
1707]
1708[add CIntPtr, CUIntPtr, CIntMax, CUIntMax types
1709Simon Marlow <simonmar@microsoft.com>**20060509092427]
1710[add GHC.Dynamic
1711Simon Marlow <simonmar@microsoft.com>**20060509082739]
1712[Two things. #if defined(__GLASGOW_HASKELL__) on INLINE [n] pragmas (for jhc). And careful use of INLINE on words/unwords halves runtime for those functions
1713Don Stewart <dons@cse.unsw.edu.au>**20060509023425]
1714[Make length a good consumer
1715simonpj@microsoft**20060508142726
1716 
1717 Make length into a good consumer.  Fixes Trac bug #707.
1718 
1719 (Before length simply didn't use foldr.)
1720 
1721]
1722[Trim imports
1723simonpj@microsoft**20060508142557]
1724[Make unsafePerformIO lazy
1725simonpj@microsoft**20060508142507
1726 
1727 The stricteness analyser used to have a HACK which ensured that NOINLNE things
1728 were not strictness-analysed.  The reason was unsafePerformIO. Left to itself,
1729 the strictness analyser would discover this strictness for unsafePerformIO:
1730        unsafePerformIO:  C(U(AV))
1731 But then consider this sub-expression
1732        unsafePerformIO (\s -> let r = f x in
1733                               case writeIORef v r s of (# s1, _ #) ->
1734                               (# s1, r #)
1735 The strictness analyser will now find that r is sure to be eval'd,
1736 and may then hoist it out.  This makes tests/lib/should_run/memo002
1737 deadlock.
1738 
1739 Solving this by making all NOINLINE things have no strictness info is overkill.
1740 In particular, it's overkill for runST, which is perfectly respectable.
1741 Consider
1742        f x = runST (return x)
1743 This should be strict in x.
1744 
1745 So the new plan is to define unsafePerformIO using the 'lazy' combinator:
1746 
1747        unsafePerformIO (IO m) = lazy (case m realWorld# of (# _, r #) -> r)
1748 
1749 Remember, 'lazy' is a wired-in identity-function Id, of type a->a, which is
1750 magically NON-STRICT, and is inlined after strictness analysis.  So
1751 unsafePerformIO will look non-strict, and that's what we want.
1752 
1753]
1754[Sync with FPS head.
1755Don Stewart <dons@cse.unsw.edu.au>**20060508122322
1756 
1757 Mon May  8 10:40:14 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
1758   * Fix all uses for Int that should be CInt or CSize in ffi imports.
1759   Spotted by Igloo, dcoutts
1760 
1761 Mon May  8 16:09:41 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
1762   * Import nicer loop/loop fusion rule from ghc-ndp
1763 
1764 Mon May  8 17:36:07 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
1765   * Fix stack leak in split on > 60M strings
1766 
1767 Mon May  8 17:50:13 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
1768   * Try same fix for stack overflow in elemIndices
1769 
1770]
1771[Fix all uses for Int that should be CInt or CSize in ffi imports. Spotted by Duncan and Ian
1772Don Stewart <dons@cse.unsw.edu.au>**20060508010311]
1773[Fixed import list syntax
1774Sven Panne <sven.panne@aedion.de>**20060507155008]
1775[Faster filterF, filterNotByte
1776dons@cse.unsw.edu.au**20060507042301]
1777[Much faster find, findIndex. Hint from sjanssen
1778dons@cse.unsw.edu.au**20060507033048]
1779[Merge "unrecognized long opt" fix from 6.4.2
1780Sven Panne <sven.panne@aedion.de>**20060506110519]
1781[
1782dons@cse.unsw.edu.au**20060506061029
1783 Sat May  6 13:01:34 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
1784   * Do loopU realloc on the Haskell heap. And add a really tough stress test
1785 
1786 Sat May  6 12:28:58 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
1787   * Use simple, 3x faster concat. Plus QC properties. Suggested by sjanssen and dcoutts
1788 
1789 Sat May  6 15:59:31 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
1790   * dcoutt's packByte bug squashed
1791   
1792   With inlinePerformIO, ghc head was compiling:
1793   
1794    packByte 255 `compare` packByte 127
1795   
1796   into roughly
1797   
1798    case mallocByteString 2 of
1799        ForeignPtr f internals ->
1800             case writeWord8OffAddr# f 0 255 of _ ->
1801             case writeWord8OffAddr# f 0 127 of _ ->
1802             case eqAddr# f f of
1803                    False -> case compare (GHC.Prim.plusAddr# f 0)
1804                                          (GHC.Prim.plusAddr# f 0)
1805   
1806   which is rather stunning. unsafePerformIO seems to prevent whatever
1807   magic inlining was leading to this. Only affected the head.
1808   
1809]
1810[Add array fusion versions of map, filter and foldl
1811dons@cse.unsw.edu.au**20060505060858
1812 
1813 This patch adds fusable map, filter and foldl, using the array fusion
1814 code for unlifted, flat arrays, from the Data Parallel Haskell branch,
1815 after kind help from Roman Leshchinskiy,
1816 
1817 Pipelines of maps, filters and folds should now need to walk the
1818 bytestring once only, and intermediate bytestrings won't be constructed.
1819 
1820]
1821[fix for non-GHC
1822Ross Paterson <ross@soi.city.ac.uk>**20060504093044]
1823[use bracket in appendFile (like writeFile)
1824Ross Paterson <ross@soi.city.ac.uk>**20060504091528]
1825[writeFile: close the file on error
1826Simon Marlow <simonmar@microsoft.com>**20060504084505
1827 Suggested by Ross Paterson, via Neil Mitchell
1828 
1829]
1830[Sync with FPS head
1831dons@cse.unsw.edu.au**20060503105259
1832 
1833 This patch brings Data.ByteString into sync with the FPS head.
1834 The most significant of which is the new Haskell counting sort.
1835 
1836 Changes:
1837 
1838 Sun Apr 30 18:16:29 EST 2006  sjanssen@cse.unl.edu
1839   * Fix foldr1 in Data.ByteString and Data.ByteString.Char8
1840 
1841 Mon May  1 11:51:16 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
1842   * Add group and groupBy. Suggested by conversation between sjanssen and petekaz on #haskell
1843 
1844 Mon May  1 16:42:04 EST 2006  sjanssen@cse.unl.edu
1845   * Fix groupBy to match Data.List.groupBy.
1846 
1847 Wed May  3 15:01:07 EST 2006  sjanssen@cse.unl.edu
1848   * Migrate to counting sort.
1849   
1850   Data.ByteString.sort used C's qsort(), which is O(n log n).  The new algorithm
1851   is O(n), and is faster for strings larger than approximately thirty bytes.  We
1852   also reduce our dependency on cbits!
1853 
1854]
1855[improve performance of Integer->String conversion
1856Simon Marlow <simonmar@microsoft.com>**20060503113306
1857 See
1858  http://www.haskell.org//pipermail/libraries/2006-April/005227.html
1859 
1860 Submitted by: bertram.felgenhauer@googlemail.com
1861 
1862 
1863]
1864[inline withMVar, modifyMVar, modifyMVar_
1865Simon Marlow <simonmar@microsoft.com>**20060503111152]
1866[Fix string truncating in hGetLine -- it was a pasto from Simon's code
1867Simon Marlow <simonmar@microsoft.com>**20060503103504
1868 (from Don Stewart)
1869]
1870[Merge in Data.ByteString head. Fixes ByteString+cbits in hugs
1871Don Stewart <dons@cse.unsw.edu.au>**20060429040733]
1872[Import Data.ByteString from fps 0.5.
1873Don Stewart <dons@cse.unsw.edu.au>**20060428130718
1874 Fast, packed byte vectors, providing a better PackedString.
1875 
1876]
1877[fix previous patch
1878Ross Paterson <ross@soi.city.ac.uk>**20060501154847]
1879[fixes for non-GHC
1880Ross Paterson <ross@soi.city.ac.uk>**20060501144322]
1881[fix imports for mingw32 && !GHC
1882Ross Paterson <ross@soi.city.ac.uk>**20060427163248]
1883[RequireOrder: do not collect unrecognised options after a non-opt
1884Simon Marlow <simonmar@microsoft.com>**20060426121110
1885 The documentation for RequireOrder says "no option processing after
1886 first non-option", so it doesn't seem right that we should process the
1887 rest of the arguments to collect the unrecognised ones.  Presumably
1888 the client wants to know about the unrecognised options up to the
1889 first non-option, and will be using a different option parser for the
1890 rest of the command line.
1891 
1892 eg. before:
1893 
1894 Prelude System.Console.GetOpt> getOpt' RequireOrder [] ["bar","--foo"]
1895 ([],["bar","--foo"],["--foo"],[])
1896 
1897 after:
1898 
1899 Prelude System.Console.GetOpt> getOpt' RequireOrder [] ["bar","--foo"]
1900 ([],["bar","--foo"],[],[])
1901]
1902[fix for Haddock 0.7
1903Ashley Yakeley <ashley@semantic.org>**20060426072521]
1904[add Data.Fixed module
1905Ashley Yakeley <ashley@semantic.org>**20060425071853]
1906[add instances
1907Ross Paterson <ross@soi.city.ac.uk>**20060424102146]
1908[add superclasses to Applicative and Traversable
1909Ross Paterson <ross@soi.city.ac.uk>**20060411144734
1910 
1911 Functor is now a superclass of Applicative, and Functor and Foldable
1912 are now superclasses of Traversable.  The new hierarchy makes clear the
1913 inclusions between the classes, but means more work in defining instances.
1914 Default definitions are provided to help.
1915]
1916[add Functor and Monad instances for Prelude types
1917Ross Paterson <ross@soi.city.ac.uk>**20060410111443]
1918[GHC.Base.breakpoint
1919Lemmih <lemmih@gmail.com>**20060407125827]
1920[Track the GHC source tree reorganisation
1921Simon Marlow <simonmar@microsoft.com>**20060407041631]
1922[in the show instance for Exception, print the type of dynamic exceptions
1923Simon Marlow <simonmar@microsoft.com>**20060406112444
1924 Unfortunately this requires some recursve module hackery to get at
1925 the show instance for Typeable.
1926]
1927[implement ForeignEnvPtr, newForeignPtrEnv, addForeignPtrEnv for GHC
1928Simon Marlow <simonmar@microsoft.com>**20060405155448]
1929[add  forkOnIO :: Int -> IO () -> IO ThreadId
1930Simon Marlow <simonmar@microsoft.com>**20060327135018]
1931[Rework previous: not a gcc bug after all
1932Simon Marlow <simonmar@microsoft.com>**20060323161229
1933 It turns out that we were relying on behaviour that is undefined in C,
1934 and undefined behaviour in C means "the compiler can do whatever the
1935 hell it likes with your entire program".  So avoid that.
1936]
1937[work around a gcc 4.1.0 codegen bug in -O2 by forcing -O1 for GHC.Show
1938Simon Marlow <simonmar@microsoft.com>**20060323134514
1939 See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26824
1940]
1941[commit mysteriously missing parts of "runIOFastExit" patch
1942Simon Marlow <simonmar@microsoft.com>**20060321101535]
1943[add runIOFastExit :: IO a -> IO a
1944Simon Marlow <simonmar@microsoft.com>**20060320124333
1945 Similar to runIO, but calls stg_exit() directly to exit, rather than
1946 shutdownHaskellAndExit().  Needed for running GHCi in the test suite.
1947]
1948[Fix a broken invariant
1949Simon Marlow <simonmar@microsoft.com>**20060316134151
1950 Patch from #694,  for the problem "empty is an identity for <> and $$" is
1951 currently broken by eg. isEmpty (empty<>empty)"
1952]
1953[Add unsafeSTToIO :: ST s a -> IO a
1954Simon Marlow <simonmar@microsoft.com>**20060315160232
1955 Implementation for Hugs is missing, but should be easy.  We need this
1956 for the forthcoming nested data parallelism implementation.
1957]
1958[Added 'alter'
1959jeanphilippe.bernardy@gmail.com**20060315143539
1960 Added 'alter :: (Maybe a -> Maybe a) -> k -> Map k a -> Map k a' to IntMap and Map
1961 This addresses ticket #665
1962]
1963[deprecate FunctorM in favour of Foldable and Traversable
1964Ross Paterson <ross@soi.city.ac.uk>**20060315092942
1965 as discussed on the libraries list.
1966]
1967[Simplify Eq, Ord, and Show instances for UArray
1968Simon Marlow <simonmar@microsoft.com>**20060313142701
1969 The Eq, Ord, and Show instances of UArray were written out longhand
1970 with one instance per element type.  It is possible to condense these
1971 into a single instance for each class, at the expense of using more
1972 extensions (non-std context on instance declaration).
1973 
1974 Suggestion by: Frederik Eaton <frederik@ofb.net>
1975 
1976]
1977[Oops typo in intSet notMember
1978jeanphilippe.bernardy@gmail.com**20060311224713]
1979[IntMap lookup now returns monad instead of Maybe.
1980jeanphilippe.bernardy@gmail.com**20060311224502]
1981[Added notMember to Data.IntSet and Data.IntMap
1982jeanphilippe.bernardy@gmail.com**20060311085221]
1983[add Data.Set.notMember and Data.Map.notMember
1984John Meacham <john@repetae.net>**20060309191806]
1985[addToClockTime: handle picoseconds properly
1986Simon Marlow <simonmar@microsoft.com>**20060310114532
1987 fixes #588
1988]
1989[make head/build rule apply to all types, not just Bool.
1990John Meacham <john@repetae.net>**20060303045753]
1991[Avoid overflow when normalising clock times
1992Ian Lynagh <igloo@earth.li>**20060210144638]
1993[Years have 365 days, not 30*365
1994Ian Lynagh <igloo@earth.li>**20060210142853]
1995[declare blkcmp() static
1996Simon Marlow <simonmar@microsoft.com>**20060223134317]
1997[typo in comment in Foldable class
1998Ross Paterson <ross@soi.city.ac.uk>**20060209004901]
1999[simplify fmap
2000Ross Paterson <ross@soi.city.ac.uk>**20060206095048]
2001[update ref in comment
2002Ross Paterson <ross@soi.city.ac.uk>**20060206095139]
2003[Give -foverlapping-instances to Data.Typeable
2004simonpj@microsoft**20060206133439
2005 
2006 For some time, GHC has made -fallow-overlapping-instances "sticky":
2007 any instance in a module compiled with -fallow-overlapping-instances
2008 can overlap when imported, regardless of whether the importing module
2009 allows overlap.  (If there is an overlap, both instances must come from
2010 modules thus compiled.)
2011 
2012 Instances in Data.Typeable might well want to be overlapped, so this
2013 commit adds the flag to Data.Typeable (with an explanatory comment)
2014 
2015 
2016]
2017[Add -fno-bang-patterns to modules using both bang and glasgow-exts
2018simonpj@microsoft.com**20060203175759]
2019[When splitting a bucket, keep the contents in the same order
2020Simon Marlow <simonmar@microsoft.com>**20060201130427
2021 To retain the property that multiple inserts shadow each other
2022 (see ticket #661, test hash001)
2023]
2024[add foldr/build optimisation for take and replicate
2025Simon Marlow <simonmar@microsoft.com>**20060126164603
2026 This allows take to be deforested, and improves performance of
2027 replicate and replicateM/replicateM_.  We have a separate problem that
2028 means expressions involving [n..m] aren't being completely optimised
2029 because eftIntFB isn't being inlined but otherwise the results look
2030 good. 
2031 
2032 Sadly this has invalidated a number of the nofib benchmarks which were
2033 erroneously using take to duplicate work in a misguided attempt to
2034 lengthen their runtimes (ToDo).
2035]
2036[Generate PrimopWrappers.hs with Haddock docs
2037Simon Marlow <simonmar@microsoft.com>**20060124131121
2038 Patch originally from Dinko Tenev <dinko.tenev@gmail.com>, modified
2039 to add log message by me.
2040]
2041[[project @ 2006-01-19 14:47:15 by ross]
2042ross**20060119144715
2043 backport warning avoidance from Haddock
2044]
2045[[project @ 2006-01-18 11:45:47 by malcolm]
2046malcolm**20060118114547
2047 Fix import of Ix for nhc98.
2048]
2049[[project @ 2006-01-17 09:38:38 by ross]
2050ross**20060117093838
2051 add Ix instance for GeneralCategory.
2052]
2053[TAG Initial conversion from CVS complete
2054John Goerzen <jgoerzen@complete.org>**20060112154126]
2055Patch bundle hash:
20561f24653c3cabffecda6f3c11f22d6ba3183b33f0