Tue May 4 10:57:26 PDT 2010 Tim Chevalier * base library SIMPLE_IO stuff New patches: [base library SIMPLE_IO stuff Tim Chevalier **20100504175726 Ignore-this: f2ae0cb8a3ff2ccfd6564b92e49ea67e ] { hunk ./Control/Exception/Base.hs 102 #ifdef __GLASGOW_HASKELL__ -- * Calls for GHC runtime recSelError, recConError, irrefutPatError, runtimeError, - nonExhaustiveGuardsError, patError, noMethodBindingError, - nonTermination, nestedAtomically, -#endif + nonExhaustiveGuardsError, patError, noMethodBindingError + ,nonTermination, nestedAtomically, ) where #ifdef __GLASGOW_HASKELL__ hunk ./Control/Exception/Base.hs 697 #endif /* __GLASGOW_HASKELL__ || __HUGS__ */ +#endif /* SIMPLE_IO */ + + #ifdef __GLASGOW_HASKELL__ recSelError, recConError, irrefutPatError, runtimeError, nonExhaustiveGuardsError, patError, noMethodBindingError hunk ./Control/Exception/Base.hs 705 :: Addr# -> a -- All take a UTF8-encoded C string +#ifndef SIMPLE_IO recSelError s = throw (RecSelError (unpackCStringUtf8# s)) -- No location info unfortunately runtimeError s = error (unpackCStringUtf8# s) -- No location info unfortunately hunk ./Control/Exception/Base.hs 714 recConError s = throw (RecConError (untangle s "Missing field in record construction")) noMethodBindingError s = throw (NoMethodError (untangle s "No instance nor default method for class operation")) patError s = throw (PatternMatchFail (untangle s "Non-exhaustive patterns in")) +#else +recSelError s = error (unpackCStringUtf8# s) +runtimeError s = error (unpackCStringUtf8# s) +nonExhaustiveGuardsError s = error (unpackCStringUtf8# s) +irrefutPatError s = error (unpackCStringUtf8# s) +recConError s = error (unpackCStringUtf8# s) +noMethodBindingError s = error (unpackCStringUtf8# s) +patError s = error (unpackCStringUtf8# s) +#endif -- GHC's RTS calls this nonTermination :: SomeException hunk ./Control/Exception/Base.hs 731 -- GHC's RTS calls this nestedAtomically :: SomeException nestedAtomically = toException NestedAtomically + #endif hunk ./GHC/Err.lhs 49 \begin{code} -- | 'error' stops execution and displays an error message. +#ifndef SIMPLE_IO error :: [Char] -> a error s = throw (ErrorCall s) hunk ./GHC/Err.lhs 60 undefined :: a undefined = error "Prelude.undefined" +#else +{-# NOINLINE error #-} +error :: [Char] -> a +error s = error s +undefined = error "undefined" +#endif \end{code} %********************************************************* hunk ./GHC/Err.lhs 78 encoding saves bytes of string junk. \begin{code} +#ifndef SIMPLE_IO absentErr :: a absentErr = error "Oops! The program has entered an `absent' argument!\n" hunk ./GHC/Err.lhs 96 {-# NOINLINE overflowError #-} overflowError :: a overflowError = throw Overflow +#else +absentErr, divZeroError, overflowError :: a +absentErr = error "absent" +divZeroError = error "div by zero" +overflowError = error "div by zero" +#endif \end{code} hunk ./GHC/Err.lhs 103 - hunk ./GHC/Float.lhs 36 import GHC.Arr infixr 8 ** + \end{code} %********************************************************* hunk ./GHC/Float.lhs 74 class (RealFrac a, Floating a) => RealFloat a where -- | a constant function, returning the radix of the representation -- (often @2@) +#ifndef SIMPLE_IO floatRadix :: a -> Integer hunk ./GHC/Float.lhs 76 +#else + floatRadix :: a -> Int +#endif -- | a constant function, returning the number of digits of -- 'floatRadix' in the significand floatDigits :: a -> Int hunk ./GHC/Float.lhs 184 fromInteger i = F# (floatFromInteger i) instance Real Float where - toRational x = (m%1)*(b%1)^^n + toRational x = (m%1)*(fromIntegral b%1)^^n where (m,n) = decodeFloat x b = floatRadix x hunk ./GHC/Float.lhs 208 {-# INLINE truncate #-} properFraction x +#ifndef SIMPLE_IO = case (decodeFloat x) of { (m,n) -> let b = floatRadix x in if n >= 0 then hunk ./GHC/Float.lhs 218 (fromInteger w, encodeFloat r n) } } +#else + = case (decodeFloat x) of { (m,n) -> + let b = floatRadix x in + if n >= 0 then + (fromIntegral (fromInteger m * (b ^ n)), 0.0) + else + case (quotRem (fromInteger m) (b^(negate n))) of { (w,r) -> + (fromIntegral w, encodeFloat (fromIntegral r) n) + } + } + +#endif truncate x = case properFraction x of (n,_) -> n hunk ./GHC/Float.lhs 244 EQ -> if even n then n else m GT -> m + {-# SPECIALIZE ceiling :: Float -> Int #-} ceiling x = case properFraction x of (n,r) -> if r > 0.0 then n + 1 else n hunk ./GHC/Float.lhs 337 instance Real Double where +#ifndef SIMPLE_IO toRational x = (m%1)*(b%1)^^n where (m,n) = decodeFloat x b = floatRadix x hunk ./GHC/Float.lhs 341 +#else + toRational x = (m%1)*(fromIntegral b%1)^^n + where + (m,n) = decodeFloat x + b::Int = floatRadix x + +#endif instance Fractional Double where (/) x y = divideDouble x y hunk ./GHC/Float.lhs 389 {-# INLINE floor #-} {-# INLINE truncate #-} + properFraction x hunk ./GHC/Float.lhs 391 +#ifndef SIMPLE_IO = case (decodeFloat x) of { (m,n) -> let b = floatRadix x in if n >= 0 then hunk ./GHC/Float.lhs 401 (fromInteger w, encodeFloat r n) } } +#else + = case (decodeFloat x) of { (m,n) -> + let b = floatRadix x in + if n >= 0 then + (fromIntegral (fromInteger m * (b ^ n)), 0.0) + else + case (quotRem (fromInteger m) (b^(negate n))) of { (w,r) -> + (fromIntegral w, encodeFloat (fromIntegral r) n) + } + } + +#endif truncate x = case properFraction x of (n,_) -> n hunk ./GHC/Float.lhs 517 -- | Show a signed 'RealFloat' value to full precision -- using standard decimal notation for arguments whose absolute value lies -- between @0.1@ and @9,999,999@, and scientific notation otherwise. + +{-# SPECIALIZE showFloat :: Float -> ShowS #-} +{-# SPECIALIZE showFloat :: Double -> ShowS #-} showFloat :: (RealFloat a) => a -> ShowS showFloat x = showString (formatRealFloat FFGeneric Nothing x) hunk ./GHC/Float.lhs 527 data FFFormat = FFExponent | FFFixed | FFGeneric +{-# SPECIALIZE formatRealFloat :: FFFormat -> Maybe Int -> Float -> String #-} +{-# SPECIALIZE formatRealFloat :: FFFormat -> Maybe Int -> Double -> String #-} formatRealFloat :: (RealFloat a) => FFFormat -> Maybe Int -> a -> String formatRealFloat fmt decs x | isNaN x = "NaN" hunk ./GHC/Float.lhs 535 | isInfinite x = if x < 0 then "-Infinity" else "Infinity" | x < 0 || isNegativeZero x = '-':doFmt fmt (floatToDigits (toInteger base) (-x)) | otherwise = doFmt fmt (floatToDigits (toInteger base) x) - where + where base = 10 doFmt format (is, e) = hunk ./GHC/Float.lhs 629 -- -- (3) @0 <= di <= base-1@ +-- #ifndef SIMPLE_IO floatToDigits :: (RealFloat a) => Integer -> a -> ([Int], Int) floatToDigits _ 0 = ([0], 0) floatToDigits base x = hunk ./GHC/Float.lhs 637 (f0, e0) = decodeFloat x (minExp0, _) = floatRange x p = floatDigits x - b = floatRadix x + b = fromIntegral $ floatRadix x minExp = minExp0 - p -- the real minimum exponent -- Haskell requires that f be adjusted so denormalized numbers -- will have an impossibly low exponent. Adjust for this. hunk ./GHC/Float.lhs 701 gen [] (r * bk) s (mUp * bk) (mDn * bk) in (map fromIntegral (reverse rds), k) +{- + #else +floatToDigits :: (RealFloat a) => Integer -> a -> ([Int], Int) +floatToDigits _ 0 = ([0], 0) +floatToDigits base x = + let + (f0, e0) = case decodeFloat x of + (f00,e00) -> (fromIntegral f00,fromIntegral e00) + (minExp0, _) = floatRange x + p = floatDigits x + b = fromIntegral $ floatRadix x + minExp = minExp0 - p -- the real minimum exponent + -- Haskell requires that f be adjusted so denormalized numbers + -- will have an impossibly low exponent. Adjust for this. + (f::Integer, e::Int) = + let n = minExp - e0 in + if n > 0 then (f0 `div` ((fromIntegral b)^n), e0+n) else (f0, e0) + (r, s, mUp, mDn) = + if e >= 0 then + let be = (fromIntegral b)^ e in + if f == (fromIntegral b)^(p-1) then + (f*be*(fromIntegral b)*2, 2*b, be*(fromIntegral b), b) + else + (f*be*2, 2, fromIntegral be, fromIntegral be) + else + if e > minExp && f == b^(p-1) then + (f*b*2, b^(-e+1)*2, b, 1) + else + (f*2, b^(-e)*2, 1, 1) + k :: Int + k = + let + k0 :: Int + k0 = + if b == 2 && base == 10 then + -- logBase 10 2 is slightly bigger than 3/10 so + -- the following will err on the low side. Ignoring + -- the fraction will make it err even more. + -- Haskell promises that p-1 <= logBase b f < p. + (p - 1 + e0) * 3 `div` 10 + else + ceilingFloatInt ((log (fromInteger (f+1) :: Float) + + fromIntegral e * log (fromInteger b)) / + log (fromInteger base)) +--WAS: fromInt e * log (fromInteger b)) + + ceilingFloatInt :: Float -> Int + ceilingFloatInt x = case properFraction x of + (n,r) -> if r > 0.0 then n + 1 else n + + fixup n = + if n >= 0 then + if r + mUp <= expt base n * s then n else fixup (n+1) + else + if expt base (-n) * (r + mUp) <= s then n else fixup (n+1) + in + fixup k0 + + gen ds rn sN mUpN mDnN = + let + (dn, rn') = (rn * base) `divMod` sN + mUpN' = mUpN * base + mDnN' = mDnN * base + in + case (rn' < mDnN', rn' + mUpN' > sN) of + (True, False) -> dn : ds + (False, True) -> dn+1 : ds + (True, True) -> if rn' * 2 < sN then dn : ds else dn+1 : ds + (False, False) -> gen (dn:ds) rn' sN mUpN' mDnN' + + rds = + if k >= 0 then + gen [] r (s * expt base k) mUp mDn + else + let bk = expt base (-k) in + gen [] (r * bk) s (mUp * bk) (mDn * bk) + in + (map fromIntegral (reverse rds), k) + +{- + +floatToDigits :: (RealFloat a) => Int -> a -> ([Int], Int) +floatToDigits _ 0 = ([0], 0) +floatToDigits base x = + let + (f0, e0) = case decodeFloat x of + (f00,e00) -> (fromIntegral f00,fromIntegral e00) + (minExp0, _) = floatRange x + p = floatDigits x + b :: Int + b = fromIntegral $ floatRadix x + minExp = minExp0 - p -- the real minimum exponent + -- Haskell requires that f be adjusted so denormalized numbers + -- will have an impossibly low exponent. Adjust for this. + (f, e)::(Int,Int) = + let n = minExp - e0 in + if n > 0 then (f0 `div` (b^n), e0+n) else (f0, e0) + (r, s, mUp, mDn)::(Int,Int,Int,Int) = + if e >= 0 then + let be = b^ e in + if f == b^(p-1) then + (f*be*b*2, 2*b, be*b, b) + else + (f*be*2, 2, be, be) + else + if e > minExp && f == b^(p-1) then + (f*b*2, b^(-e+1)*2, b, 1) + else + (f*2, b^(-e)*2, 1, 1) + k :: Int + k = + let + k0 :: Int + k0 = + if b == 2 && base == 10 then + -- logBase 10 2 is slightly bigger than 3/10 so + -- the following will err on the low side. Ignoring + -- the fraction will make it err even more. + -- Haskell promises that p-1 <= logBase b f < p. + (p - 1 + e0) * 3 `div` 10 + else + ceilingInt ((log (fromIntegral (f+1)) + + fromIntegral e * log (fromIntegral b)) / + log (fromIntegral base)) +--WAS: fromInt e * log (fromInteger b)) + + fixup n = + if n >= 0 then + if r + mUp <= (base^n) * s then n else fixup (n+1) + else + if (base^ (-n)) * (r + mUp) <= s then n else fixup (n+1) + in + fixup k0 + + ceilingInt :: Float -> Int + ceilingInt x = case properFractionInt x of + (n,r) -> if r > 0.0 then n + 1 else n + + properFractionInt :: Float -> (Int,Float) + properFractionInt x + = case (decodeFloat x) of { (m,n) -> + let b = floatRadix x in + if n >= 0 then + (fromIntegral (fromInteger m * (b ^ n)), 0.0) + else + case (quotRem (fromInteger m) (b^(negate n))) of { (w,r) -> + (fromIntegral w, encodeFloat (fromIntegral r) n) + } + } + + gen ds rn sN mUpN mDnN = + let + (dn, rn') = (rn * base) `divMod` sN + mUpN' = mUpN * base + mDnN' = mDnN * base + in + case (rn' < mDnN', rn' + mUpN' > sN) of + (True, False) -> dn : ds + (False, True) -> dn+1 : ds + (True, True) -> if rn' * 2 < sN then dn : ds else dn+1 : ds + (False, False) -> gen (dn:ds) rn' sN mUpN' mDnN' + + rds = + if k >= 0 then + gen [] r (s * (base^k)) mUp mDn + else + let bk = (base^(-k)) in + gen [] (r * bk) s (mUp * bk) (mDn * bk) + in + (map fromIntegral (reverse rds), k) +-} + #endif +-} \end{code} hunk ./GHC/Float.lhs 959 fromRat' :: (RealFloat a) => Rational -> a -- Invariant: argument is strictly positive fromRat' x = r - where b = floatRadix r + where + b = fromIntegral $ floatRadix r p = floatDigits r hunk ./GHC/Float.lhs 962 - (minExp0, _) = floatRange r - minExp = minExp0 - p -- the real minimum exponent + (minExp0,_) = floatRange r + minExp = minExp0 - p xMin = toRational (expt b (p-1)) xMax = toRational (expt b p) p0 = (integerLogBase b (numerator x) - integerLogBase b (denominator x) - p) `max` minExp hunk ./GHC/Float.lhs 986 expt :: Integer -> Int -> Integer expt base n = +#ifndef SIMPLE_IO if base == 2 && n >= minExpt && n <= maxExpt then expts!n else hunk ./GHC/Float.lhs 990 +#endif base^n expts :: Array Int Integer hunk ./GHC/Float.lhs 1053 asinFloat, acosFloat, atanFloat :: Float -> Float sinhFloat, coshFloat, tanhFloat :: Float -> Float expFloat (F# x) = F# (expFloat# x) +#ifndef SIMPLE_IO logFloat (F# x) = F# (logFloat# x) hunk ./GHC/Float.lhs 1055 +#else +logFloat (F# x) = F# (c_logFloat x) +foreign import ccall "c_logFloat" + c_logFloat :: Float# -> Float# +#endif +#ifndef SIMPLE_IO sqrtFloat (F# x) = F# (sqrtFloat# x) sinFloat (F# x) = F# (sinFloat# x) hunk ./GHC/Float.lhs 1063 -cosFloat (F# x) = F# (cosFloat# x) tanFloat (F# x) = F# (tanFloat# x) hunk ./GHC/Float.lhs 1064 +cosFloat (F# x) = F# (cosFloat# x) +atanFloat (F# x) = F# (atanFloat# x) +#else +sqrtFloat (F# x) = F# (c_sqrt x) +foreign import ccall "sqrt" + c_sqrt :: Float# -> Float# +atanFloat (F# x) = F# (c_atan_float x) +foreign import ccall "atan" + c_atan_float :: Float# -> Float# +sinFloat (F# x) = F# (c_sin_float x) +foreign import ccall "sin" + c_sin_float :: Float# -> Float# +cosFloat (F# x) = F# (c_cos_float x) +foreign import ccall "cos" + c_cos_float :: Float# -> Float# +tanFloat (F# x) = F# (c_tan_float x) +foreign import ccall "tan" + c_tan_float :: Float# -> Float# +#endif asinFloat (F# x) = F# (asinFloat# x) acosFloat (F# x) = F# (acosFloat# x) hunk ./GHC/Float.lhs 1085 -atanFloat (F# x) = F# (atanFloat# x) sinhFloat (F# x) = F# (sinhFloat# x) coshFloat (F# x) = F# (coshFloat# x) tanhFloat (F# x) = F# (tanhFloat# x) hunk ./GHC/Float.lhs 1090 powerFloat :: Float -> Float -> Float +#ifndef SIMPLE_IO powerFloat (F# x) (F# y) = F# (powerFloat# x y) hunk ./GHC/Float.lhs 1092 +#else +powerFloat (F# x) (F# y) = F# (c_powerFloat x y) +foreign import ccall "c_powerFloat" + c_powerFloat :: Float# -> Float# -> Float# +#endif -- definitions of the boxed PrimOps; these will be -- used in the case of partial applications, etc. hunk ./GHC/Float.lhs 1135 asinDouble, acosDouble, atanDouble :: Double -> Double sinhDouble, coshDouble, tanhDouble :: Double -> Double expDouble (D# x) = D# (expDouble# x) +#ifndef SIMPLE_IO logDouble (D# x) = D# (logDouble# x) hunk ./GHC/Float.lhs 1137 +#else +logDouble (D# x) = D# (c_logDouble x) +foreign import ccall "c_logDouble" + c_logDouble :: Double# -> Double# +#endif +#ifndef SIMPLE_IO sqrtDouble (D# x) = D# (sqrtDouble# x) sinDouble (D# x) = D# (sinDouble# x) cosDouble (D# x) = D# (cosDouble# x) hunk ./GHC/Float.lhs 1147 tanDouble (D# x) = D# (tanDouble# x) +atanDouble (D# x) = D# (atanDouble# x) +#else +sqrtDouble (D# x) = D# (c_sqrtD x) +sinDouble (D# x) = D# (c_sin x) +cosDouble (D# x) = D# (c_cos x) +tanDouble (D# x) = D# (c_tan x) +atanDouble (D# x) = D# (c_atan x) +foreign import ccall "sqrt" + c_sqrtD :: Double# -> Double# +foreign import ccall "sin" + c_sin :: Double# -> Double# +foreign import ccall "cos" + c_cos :: Double# -> Double# +foreign import ccall "tan" + c_tan :: Double# -> Double# +foreign import ccall "atan" + c_atan :: Double# -> Double# +#endif asinDouble (D# x) = D# (asinDouble# x) acosDouble (D# x) = D# (acosDouble# x) hunk ./GHC/Float.lhs 1167 -atanDouble (D# x) = D# (atanDouble# x) sinhDouble (D# x) = D# (sinhDouble# x) coshDouble (D# x) = D# (coshDouble# x) tanhDouble (D# x) = D# (tanhDouble# x) hunk ./GHC/Float.lhs 1172 powerDouble :: Double -> Double -> Double +#ifndef SIMPLE_IO powerDouble (D# x) (D# y) = D# (x **## y) hunk ./GHC/Float.lhs 1174 +#else +powerDouble d1 d2 = case (realToFrac d1, realToFrac d2) of + (F# f1, F# f2) -> realToFrac $ F# (c_powerFloat f1 f2) +#endif \end{code} \begin{code} hunk ./GHC/Real.lhs 451 lcm 0 _ = 0 lcm x y = abs ((x `quot` (gcd x y)) * y) +{- {-# RULES "gcd/Int->Int->Int" gcd = gcdInt "gcd/Integer->Integer->Integer" gcd = gcdInteger' hunk ./GHC/Real.lhs 464 gcdInteger' :: Integer -> Integer -> Integer gcdInteger' 0 0 = error "GHC.Real.gcdInteger': gcd 0 0 is undefined" gcdInteger' a b = gcdInteger a b +-} integralEnumFrom :: (Integral a, Bounded a) => a -> [a] integralEnumFrom n = map fromInteger [toInteger n .. toInteger (maxBound `asTypeOf` n)] hunk ./GHC/Unicode.hs 34 import GHC.Base import GHC.Real (fromIntegral) import Foreign.C.Types (CInt) -import GHC.Num (fromInteger) +import GHC.Num -- (fromInteger) #include "HsBaseConfig.h" hunk ./GHC/Unicode.hs 78 c == '\r' || c == '\f' || c == '\v' || - c == '\xa0' || + c == '\xa0' +#ifndef SIMPLE_IO + || iswspace (fromIntegral (ord c)) /= 0 hunk ./GHC/Unicode.hs 82 +#endif -- | Selects upper-case or title-case alphabetic Unicode characters (letters). -- Title case is used by a small number of letter ligatures like the hunk ./GHC/Unicode.hs 140 -- Regardless of the O/S and Library, use the functions contained in WCsubst.c -isAlpha c = iswalpha (fromIntegral (ord c)) /= 0 -isAlphaNum c = iswalnum (fromIntegral (ord c)) /= 0 --isSpace c = iswspace (fromIntegral (ord c)) /= 0 isControl c = iswcntrl (fromIntegral (ord c)) /= 0 isPrint c = iswprint (fromIntegral (ord c)) /= 0 hunk ./GHC/Unicode.hs 143 +#ifndef SIMPLE_IO +isAlpha c = iswalpha (fromIntegral (ord c)) /= 0 +isAlphaNum c = iswalnum (fromIntegral (ord c)) /= 0 isUpper c = iswupper (fromIntegral (ord c)) /= 0 isLower c = iswlower (fromIntegral (ord c)) /= 0 hunk ./GHC/Unicode.hs 148 +#else +isAlpha c = isUpper c || isLower c +isAlphaNum c = isAlpha c || (c >= '0' && c <= '9') +isUpper c = c >= 'A' && c <= 'Z' +isLower c = c >= 'a' && c <= 'z' +#endif hunk ./GHC/Unicode.hs 155 +#ifndef SIMPLE_IO toLower c = chr (fromIntegral (towlower (fromIntegral (ord c)))) toUpper c = chr (fromIntegral (towupper (fromIntegral (ord c)))) hunk ./GHC/Unicode.hs 158 +#else +toLower c = if c >= 'A' && c <= 'Z' then + chr (ord c + (ord 'a' - ord 'A')) + else + c +toUpper c = if c >= 'a' && c <= 'a' then + chr (ord c - (ord 'a' - ord 'A')) + else + c +#endif toTitle c = chr (fromIntegral (towtitle (fromIntegral (ord c)))) foreign import ccall unsafe "u_iswalpha" } Context: [TAG GHC 6.10.4 release Ian Lynagh **20090719123606] [remove msvcrt and kernel32 from extra-libraries Simon Marlow **20090520111626 Ignore-this: cd2e24a5144c6ca0efe03ceaea8f577b ] [add _O_NOINHERIT when opening files on Windows (see #2650) Simon Marlow **20090520130926 Ignore-this: 6dfbdfe13e739cc339e627294e077ba6 ] [FIX #3171: make sure we have only one table of signal handlers Simon Marlow **20090423112837 Ignore-this: 3d8039b47efac2629e73a7d7e7d58983 ] [TAG base 4.1.0.0 Ian Lynagh **20090402004235] [TAG GHC 6.10.2 release Ian Lynagh **20090401221746] [FIX #2189: re-enabled cooked mode for Console-connected Handles on Windows Simon Marlow *-20090305113323 Patch from Sigbjorn Finne ] [Partial fix for #2917 Simon Marlow **20090305154153 Ignore-this: 3a06cd3ea09f1d6454d52031802a93fd - add newAlignedPinnedByteArray# for allocating pinned BAs with arbitrary alignment - the old newPinnedByteArray# now aligns to 16 bytes Foreign.alloca will use newAlignedPinnedByteArray#, and so might end up wasting less space than before (we used to align to 8 by default). Foreign.allocaBytes and Foreign.mallocForeignPtrBytes will get 16-byte aligned memory, which is enough to avoid problems with SSE instructions on x86, for example. There was a bug in the old newPinnedByteArray#: it aligned to 8 bytes, but would have failed if the header was not a multiple of 8 (fortunately it always was, even with profiling). Also we occasionally wasted some space unnecessarily due to alignment in allocatePinned(). I haven't done anything about Foreign.malloc/mallocBytes, which will give you the same alignment guarantees as malloc() (8 bytes on Linux/x86 here). ] [avoid a space leak building up in the "prodding" IORef (part of #2992) Simon Marlow **20090311093938] [Update version number, 4.0.0.0 -> 4.1.0.0 Ian Lynagh **20090307213233] [Add config.guess, config.sub and install-sh Ian Lynagh **20090307153831] [MERGED: add final newlines Ian Lynagh **20090306202744 Simon Marlow **20090305140014 My Windows build has started complaining about lacking final newlines, I'm not entirely sure why. ] [FIX #2189: re-enabled cooked mode for Console-connected Handles on Windows Simon Marlow **20090305113323 Patch from Sigbjorn Finne ] [Fix warnings: put imports inside ifdefs Ian Lynagh **20090220173941] [ifdef out the syncIOManager export on Windows; fixes the build Ian Lynagh **20090220173414] [ifdef out the definition of setCloseOnExec on Windows; fixes the build Ian Lynagh **20090220173041] [Set the IO manager pipe descriptors to FD_CLOEXEC Simon Marlow **20090219114217 Ignore-this: ac670a45f8a4d06dd7831a2674d6c119 This pipe is an internal implementation detail, we don't really want it to be exposed. ] [Rewrite of signal-handling (base patch; see also ghc and unix patches) Simon Marlow **20090219102203 Ignore-this: 2122e05eaaab184b9ef0f269ce4c9282 The API is the same (for now). The new implementation has the capability to define signal handlers that have access to the siginfo of the signal (#592), but this functionality is not exposed in this patch. #2451 is the ticket for the new API. The main purpose of bringing this in now is to fix race conditions in the old signal handling code (#2858). Later we can enable the new API in the HEAD. Implementation differences: - More of the signal-handling is moved into Haskell. We store the table of signal handlers in an MVar, rather than having a table of StablePtrs in the RTS. - In the threaded RTS, the siginfo of the signal is passed down the pipe to the IO manager thread, which manages the business of starting up new signal handler threads. In the non-threaded RTS, the siginfo of caught signals is stored in the RTS, and the scheduler starts new signal handler threads. ] [Fix #2971: we had lost the non-blocking flag on Handles created by openFile Simon Marlow **20090206165912 Ignore-this: 546f1a799b6e80f7b25c73ef642d8f9d This code is a mess, fortunately the new IO library cleans it up. ] [add some rules of thumb for catching exceptions, restructure the docs a bit Simon Marlow **20090205150642 Ignore-this: 8294e58f247b2cc3f193991434d336de ] [Fix #2903: ensure CWStringLen contains the length of the array rather than the String Ross Paterson **20090203011026] [OldException catches unknown exceptions as DynException Ian Lynagh **20090202151856 It's important that we put all exceptions into the old Exception type somehow, or throwing a new exception wouldn't cause the cleanup code for bracket, finally etc to happen. ] [Update the Exception docs Ian Lynagh **20090131204845] [Fix typo (reqwests -> requests); trac #2908, spotted by bancroft Ian Lynagh **20090104154405] [warning fix: don't use -XPatternSignatures in GHC >= 6.10 Simon Marlow **20081217104637] [FIX #1364: added support for C finalizers that run as soon as the value is no longer reachable. Ivan Tomac **20081210150510 Patch amended by Simon Marlow: - mkWeakFinalizer# commoned up with mkWeakFinalizerEnv# ] [TAG base 4.0.0.0 Ian Lynagh **20081212141854] [Fix #2750: change Prelude.(,) to Prelude.(,,) Jose Pedro Magalhaes **20081201113411] [Fix typo (or out of date reference) in throwTo documentation. shelarcy **20081129024639] [re-instate the gcd/Integer and lcm/Integer RULES Simon Marlow **20081120101826 Fixes a performance regression between 6.8.3 and 6.10.1 ] [Add more description of what "round" does, from the H98 report Ian Lynagh **20081119143131] [FIX #2722: update RULES for the Category/Arrow split Ross Paterson **20081104144515 The rule arr id = id interacts unpleasantly with the advice to define id = arr id in instances of Category that are also instances of Arrow (#2722). Also changed a couple of >>>'s to .'s in later rules. ] [TAG GHC 6.10.1 release Ian Lynagh **20081107191823] [docs about how exceptions are handled by forkIO'd threads (#2651) Simon Marlow **20081016100410] [Unhide GHC.Arr from haddock Ian Lynagh **20081013172823 This works around a bug where haddock comments aren't available to be re-exported between packages. I've also moved some pragmas around so that haddock can find the docs. ] [add link to the new syb wiki jpm@cs.uu.nl**20081013111605] [changing haddock links jpm@cs.uu.nl**20081010095434] [removed (->) instance from Data.Data jpm@cs.uu.nl**20081006075254] [added new module Data.Data 'Jose Pedro Magalhaes '**20081002140535 The new Data.Data module contains all of Data.Generics.Basics and most of Data.Generics.Instances. The missing instances were deemed dubious and moved to the syb package. ] [add new Data.Data module 'Jose Pedro Magalhaes '**20081002082735] [restore Complex's derived Data instance 'Jose Pedro Magalhaes '**20081002082655] [update Data.Generics import 'Jose Pedro Magalhaes '**20081002082604] [Don't use ^(2::Int) in Data.Complex.magnitude; partially fixes trac #2450 Ian Lynagh **20081004142651 We still might want to make a RULE for this, so the bug is not fully fixed. ] [Restore the Haskell 98 behaviour of Show Ratio (#1920) Simon Marlow **20080923134949] [Pad version number to 4.0.0.0 Ian Lynagh **20080920155801] [TAG 6.10 branch has been forked Ian Lynagh **20080919123437] [TAG GHC 6.10 fork Ian Lynagh **20080919004936] Patch bundle hash: 21daba6de220cd6268bed2424800caf45997cf5f