packages feed

base 4.8.1.0 → 4.8.2.0

raw patch · 7 files changed

+119/−47 lines, 7 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Data.Data: class Typeable a => Data a where gfoldl _ z = z dataCast1 _ = Nothing dataCast2 _ = Nothing gmapT f x0 = unID (gfoldl k ID x0) where k :: Data d => ID (d -> b) -> d -> ID b k (ID c) x = ID (c (f x)) gmapQl o r f = unCONST . gfoldl k z where k :: Data d => CONST r (d -> b) -> d -> CONST r b k c x = CONST $ (unCONST c) `o` f x z :: g -> CONST r g z _ = CONST r gmapQr o r0 f x0 = unQr (gfoldl k (const (Qr id)) x0) r0 where k :: Data d => Qr r (d -> b) -> d -> Qr r b k (Qr c) x = Qr (\ r -> c (f x `o` r)) gmapQ f = gmapQr (:) [] f gmapQi i f x = case gfoldl k z x of { Qi _ q -> fromJust q } where k :: Data d => Qi u (d -> b) -> d -> Qi u b k (Qi i' q) a = Qi (i' + 1) (if i == i' then Just (f a) else q) z :: g -> Qi q g z _ = Qi 0 Nothing gmapM f = gfoldl k return where k :: Data d => m (d -> b) -> d -> m b k c x = do { c' <- c; x' <- f x; return (c' x') } gmapMp f x = unMp (gfoldl k z x) >>= \ (x', b) -> if b then return x' else mzero where z :: g -> Mp m g z g = Mp (return (g, False)) k :: Data d => Mp m (d -> b) -> d -> Mp m b k (Mp c) y = Mp (c >>= \ (h, b) -> (f y >>= \ y' -> return (h y', True)) `mplus` return (h y, b)) gmapMo f x = unMp (gfoldl k z x) >>= \ (x', b) -> if b then return x' else mzero where z :: g -> Mp m g z g = Mp (return (g, False)) k :: Data d => Mp m (d -> b) -> d -> Mp m b k (Mp c) y = Mp (c >>= \ (h, b) -> if b then return (h y, b) else (f y >>= \ y' -> return (h y', True)) `mplus` return (h y, b))
+ Control.Applicative: infixl 4 <**>
+ Control.Arrow: infixr 1 ^<<
+ Control.Category: infixr 1 >>>
+ Control.Monad: infixl 4 <$!>
+ Control.Monad: infixr 1 <=<
+ Data.Bool: infixr 2 ||
+ Data.Bool: infixr 3 &&
+ Data.Data: class Typeable a => Data a
+ Data.Foldable: infix 4 `notElem`
+ Data.Function: infixl 0 `on`
+ Data.Function: infixl 1 &
+ Data.Function: infixr 0 $
+ Data.Function: infixr 9 .
+ Data.Functor: infixl 4 <$>
+ Data.List: infix 4 `notElem`
+ Data.List: infix 5 \\
+ Data.List: infixl 9 !!
+ Data.List: infixr 5 ++
+ Data.Monoid: infixr 6 <>
+ Data.Ratio: infixl 7 %
+ GHC.Conc: infixr 0 `pseq`
+ GHC.Conc.Sync: infixr 0 `pseq`
+ GHC.Exts: type family Item l;
+ GHC.Exts: }
+ GHC.Generics: type family Rep1 f :: * -> *;
+ GHC.Generics: }
+ GHC.OldList: infix 4 `notElem`
+ GHC.OldList: infix 5 \\
+ GHC.OldList: infixl 9 !!
+ GHC.OldList: infixr 5 ++
+ GHC.RTS.Flags: CollectGCStats :: GiveGCStats
+ GHC.RTS.Flags: CostCentresAll :: DoCostCentres
+ GHC.RTS.Flags: CostCentresNone :: DoCostCentres
+ GHC.RTS.Flags: CostCentresSummary :: DoCostCentres
+ GHC.RTS.Flags: CostCentresVerbose :: DoCostCentres
+ GHC.RTS.Flags: CostCentresXML :: DoCostCentres
+ GHC.RTS.Flags: HeapByCCS :: DoHeapProfile
+ GHC.RTS.Flags: HeapByClosureType :: DoHeapProfile
+ GHC.RTS.Flags: HeapByDescr :: DoHeapProfile
+ GHC.RTS.Flags: HeapByLDV :: DoHeapProfile
+ GHC.RTS.Flags: HeapByMod :: DoHeapProfile
+ GHC.RTS.Flags: HeapByRetainer :: DoHeapProfile
+ GHC.RTS.Flags: HeapByType :: DoHeapProfile
+ GHC.RTS.Flags: NoGCStats :: GiveGCStats
+ GHC.RTS.Flags: NoHeapProfiling :: DoHeapProfile
+ GHC.RTS.Flags: OneLineGCStats :: GiveGCStats
+ GHC.RTS.Flags: SummaryGCStats :: GiveGCStats
+ GHC.RTS.Flags: TraceEventLog :: DoTrace
+ GHC.RTS.Flags: TraceNone :: DoTrace
+ GHC.RTS.Flags: TraceStderr :: DoTrace
+ GHC.RTS.Flags: VerboseGCStats :: GiveGCStats
+ GHC.RTS.Flags: data DoCostCentres
+ GHC.RTS.Flags: data DoHeapProfile
+ GHC.RTS.Flags: data DoTrace
+ GHC.RTS.Flags: data GiveGCStats
+ GHC.RTS.Flags: type RtsNat = Word32
+ GHC.RTS.Flags: type RtsTime = Word64
+ Prelude: infix 4 `notElem`
+ Prelude: infixl 4 <$>
+ Prelude: infixl 9 !!
+ Prelude: infixr 0 $!
+ Prelude: infixr 1 =<<
+ Prelude: infixr 2 ||
+ Prelude: infixr 3 &&
+ Prelude: infixr 5 ++
+ Prelude: infixr 8 ^^
+ Prelude: infixr 9 .
+ Text.ParserCombinators.ReadP: infixr 5 <++
- Control.Applicative: class Applicative f => Alternative f where some v = some_v where many_v = some_v <|> pure [] some_v = (fmap (:) v) <*> many_v many v = many_v where many_v = some_v <|> pure [] some_v = (fmap (:) v) <*> many_v
+ Control.Applicative: class Applicative f => Alternative f
- Control.Applicative: class Functor f => Applicative f where a1 *> a2 = (id <$ a1) <*> a2 (<*) = liftA2 const
+ Control.Applicative: class Functor f => Applicative f
- Control.Arrow: class Category a => Arrow a where second f = arr swap >>> first f >>> arr swap where swap :: (x, y) -> (y, x) swap ~(x, y) = (y, x) f *** g = first f >>> second g f &&& g = arr (\ b -> (b, b)) >>> f *** g
+ Control.Arrow: class Category a => Arrow a
- Control.Arrow: class Arrow a => ArrowChoice a where right f = arr mirror >>> left f >>> arr mirror where mirror :: Either x y -> Either y x mirror (Left x) = Right x mirror (Right y) = Left y f +++ g = left f >>> right g f ||| g = f +++ g >>> arr untag where untag (Left x) = x untag (Right y) = y
+ Control.Arrow: class Arrow a => ArrowChoice a
- Control.Exception: class (Typeable e, Show e) => Exception e where toException = SomeException fromException (SomeException e) = cast e displayException = show
+ Control.Exception: class (Typeable e, Show e) => Exception e
- Control.Exception.Base: class (Typeable e, Show e) => Exception e where toException = SomeException fromException (SomeException e) = cast e displayException = show
+ Control.Exception.Base: class (Typeable e, Show e) => Exception e
- Control.Monad: class Functor f where (<$) = fmap . const
+ Control.Monad: class Functor f
- Control.Monad: class Applicative m => Monad m where m >> k = m >>= \ _ -> k return = pure fail s = error s
+ Control.Monad: class Applicative m => Monad m
- Control.Monad: class (Alternative m, Monad m) => MonadPlus m where mzero = empty mplus = (<|>)
+ Control.Monad: class (Alternative m, Monad m) => MonadPlus m
- Control.Monad.Instances: class Functor f where (<$) = fmap . const
+ Control.Monad.Instances: class Functor f
- Control.Monad.Instances: class Applicative m => Monad m where m >> k = m >>= \ _ -> k return = pure fail s = error s
+ Control.Monad.Instances: class Applicative m => Monad m
- Control.Monad.Zip: class Monad m => MonadZip m where mzip = mzipWith (,) mzipWith f ma mb = liftM (uncurry f) (mzip ma mb) munzip mab = (liftM fst mab, liftM snd mab)
+ Control.Monad.Zip: class Monad m => MonadZip m
- Data.Bifunctor: class Bifunctor p where bimap f g = first f . second g first f = bimap f id second = bimap id
+ Data.Bifunctor: class Bifunctor p
- Data.Bits: class Eq a => Bits a where x `shift` i | i < 0 = x `shiftR` (- i) | i > 0 = x `shiftL` i | otherwise = x x `rotate` i | i < 0 = x `rotateR` (- i) | i > 0 = x `rotateL` i | otherwise = x zeroBits = clearBit (bit 0) 0 x `setBit` i = x .|. bit i x `clearBit` i = x .&. complement (bit i) x `complementBit` i = x `xor` bit i x `shiftL` i = x `shift` i x `unsafeShiftL` i = x `shiftL` i x `shiftR` i = x `shift` (- i) x `unsafeShiftR` i = x `shiftR` i x `rotateL` i = x `rotate` i x `rotateR` i = x `rotate` (- i)
+ Data.Bits: class Eq a => Bits a
- Data.Bits: class Bits b => FiniteBits b where countLeadingZeros x = (w - 1) - go (w - 1) where go i | i < 0 = i | testBit x i = i | otherwise = go (i - 1) w = finiteBitSize x countTrailingZeros x = go 0 where go i | i >= w = i | testBit x i = i | otherwise = go (i + 1) w = finiteBitSize x
+ Data.Bits: class Bits b => FiniteBits b
- Data.Foldable: class Foldable t where fold = foldMap id foldMap f = foldr (mappend . f) mempty foldr f z t = appEndo (foldMap (Endo #. f) t) z foldr' f z0 xs = foldl f' id xs z0 where f' k x z = k $! f x z foldl f z t = appEndo (getDual (foldMap (Dual . Endo . flip f) t)) z foldl' f z0 xs = foldr f' id xs z0 where f' x k z = k $! f z x foldr1 f xs = fromMaybe (error "foldr1: empty structure") (foldr mf Nothing xs) where mf x m = Just (case m of { Nothing -> x Just y -> f x y }) foldl1 f xs = fromMaybe (error "foldl1: empty structure") (foldl mf Nothing xs) where mf m y = Just (case m of { Nothing -> y Just x -> f x y }) toList t = build (\ c n -> foldr c n t) null = foldr (\ _ _ -> False) True length = foldl' (\ c _ -> c + 1) 0 elem = any . (==) maximum = fromMaybe (error "maximum: empty structure") . getMax . foldMap (Max #. (Just :: a -> Maybe a)) minimum = fromMaybe (error "minimum: empty structure") . getMin . foldMap (Min #. (Just :: a -> Maybe a)) sum = getSum #. foldMap Sum product = getProduct #. foldMap Product
+ Data.Foldable: class Foldable t
- Data.Functor: class Functor f where (<$) = fmap . const
+ Data.Functor: class Functor f
- Data.Ix: class (Ord a) => Ix a where index b i | inRange b i = unsafeIndex b i | otherwise = hopelessIndexError unsafeIndex b i = index b i rangeSize b@(_l, h) | inRange b h = unsafeIndex b h + 1 | otherwise = 0 unsafeRangeSize b@(_l, h) = unsafeIndex b h + 1
+ Data.Ix: class (Ord a) => Ix a
- Data.Monoid: class Monoid a where mconcat = foldr mappend mempty
+ Data.Monoid: class Monoid a
- Data.Traversable: class (Functor t, Foldable t) => Traversable t where traverse f = sequenceA . fmap f sequenceA = traverse id mapM = traverse sequence = sequenceA
+ Data.Traversable: class (Functor t, Foldable t) => Traversable t
- Foreign.Storable: class Storable a where peekElemOff = peekElemOff_ undefined where peekElemOff_ :: a -> Ptr a -> Int -> IO a peekElemOff_ undef ptr off = peekByteOff ptr (off * sizeOf undef) pokeElemOff ptr off val = pokeByteOff ptr (off * sizeOf val) val peekByteOff ptr off = peek (ptr `plusPtr` off) pokeByteOff ptr off = poke (ptr `plusPtr` off) peek ptr = peekElemOff ptr 0 poke ptr = pokeElemOff ptr 0
+ Foreign.Storable: class Storable a
- GHC.Exts: class IsList l where type family Item l fromListN _ = fromList
+ GHC.Exts: class IsList l where {
- GHC.Generics: class Constructor c where conFixity _ = Prefix conIsRecord _ = False
+ GHC.Generics: class Constructor c
- GHC.Generics: class Datatype d where isNewtype _ = False
+ GHC.Generics: class Datatype d
- GHC.Generics: class Generic a where type family Rep a :: * -> *
+ GHC.Generics: class Generic a where {
- GHC.Generics: class Generic1 f where type family Rep1 f :: * -> *
+ GHC.Generics: class Generic1 f where {
- GHC.IO.BufferedIO: class BufferedIO dev where emptyWriteBuffer _dev buf = return (buf {bufL = 0, bufR = 0, bufState = WriteBuffer})
+ GHC.IO.BufferedIO: class BufferedIO dev
- GHC.IO.Device: class IODevice a where isTerminal _ = return False isSeekable _ = return False seek _ _ _ = ioe_unsupportedOperation tell _ = ioe_unsupportedOperation getSize _ = ioe_unsupportedOperation setSize _ _ = ioe_unsupportedOperation setEcho _ _ = ioe_unsupportedOperation getEcho _ = ioe_unsupportedOperation setRaw _ _ = ioe_unsupportedOperation dup _ = ioe_unsupportedOperation dup2 _ _ = ioe_unsupportedOperation
+ GHC.IO.Device: class IODevice a
- GHC.RTS.Flags: ConcFlags :: Time -> Int -> ConcFlags
+ GHC.RTS.Flags: ConcFlags :: RtsTime -> Int -> ConcFlags
- GHC.RTS.Flags: GCFlags :: Maybe FilePath -> GiveGCStats -> Nat -> Nat -> Nat -> Nat -> Nat -> Nat -> Nat -> Nat -> Bool -> Double -> Double -> Nat -> Nat -> Bool -> Bool -> Double -> Bool -> Bool -> Bool -> Time -> Bool -> Word -> Word -> GCFlags
+ GHC.RTS.Flags: GCFlags :: Maybe FilePath -> GiveGCStats -> RtsNat -> RtsNat -> RtsNat -> RtsNat -> RtsNat -> RtsNat -> RtsNat -> RtsNat -> Bool -> Double -> Double -> RtsNat -> RtsNat -> Bool -> Bool -> Double -> Bool -> Bool -> Bool -> RtsTime -> Bool -> Word -> Word -> GCFlags
- GHC.RTS.Flags: MiscFlags :: Time -> Bool -> Bool -> Word -> MiscFlags
+ GHC.RTS.Flags: MiscFlags :: RtsTime -> Bool -> Bool -> Word -> MiscFlags
- GHC.RTS.Flags: ProfFlags :: DoHeapProfile -> Time -> Word -> Bool -> Bool -> Word -> Word -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> ProfFlags
+ GHC.RTS.Flags: ProfFlags :: DoHeapProfile -> RtsTime -> Word -> Bool -> Bool -> Word -> Word -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> ProfFlags
- GHC.RTS.Flags: [ctxtSwitchTime] :: ConcFlags -> Time
+ GHC.RTS.Flags: [ctxtSwitchTime] :: ConcFlags -> RtsTime
- GHC.RTS.Flags: [generations] :: GCFlags -> Nat
+ GHC.RTS.Flags: [generations] :: GCFlags -> RtsNat
- GHC.RTS.Flags: [heapProfileInterval] :: ProfFlags -> Time
+ GHC.RTS.Flags: [heapProfileInterval] :: ProfFlags -> RtsTime
- GHC.RTS.Flags: [heapSizeSuggestion] :: GCFlags -> Nat
+ GHC.RTS.Flags: [heapSizeSuggestion] :: GCFlags -> RtsNat
- GHC.RTS.Flags: [idleGCDelayTime] :: GCFlags -> Time
+ GHC.RTS.Flags: [idleGCDelayTime] :: GCFlags -> RtsTime
- GHC.RTS.Flags: [initialStkSize] :: GCFlags -> Nat
+ GHC.RTS.Flags: [initialStkSize] :: GCFlags -> RtsNat
- GHC.RTS.Flags: [maxHeapSize] :: GCFlags -> Nat
+ GHC.RTS.Flags: [maxHeapSize] :: GCFlags -> RtsNat
- GHC.RTS.Flags: [maxStkSize] :: GCFlags -> Nat
+ GHC.RTS.Flags: [maxStkSize] :: GCFlags -> RtsNat
- GHC.RTS.Flags: [minAllocAreaSize] :: GCFlags -> Nat
+ GHC.RTS.Flags: [minAllocAreaSize] :: GCFlags -> RtsNat
- GHC.RTS.Flags: [minOldGenSize] :: GCFlags -> Nat
+ GHC.RTS.Flags: [minOldGenSize] :: GCFlags -> RtsNat
- GHC.RTS.Flags: [steps] :: GCFlags -> Nat
+ GHC.RTS.Flags: [steps] :: GCFlags -> RtsNat
- GHC.RTS.Flags: [stkChunkBufferSize] :: GCFlags -> Nat
+ GHC.RTS.Flags: [stkChunkBufferSize] :: GCFlags -> RtsNat
- GHC.RTS.Flags: [stkChunkSize] :: GCFlags -> Nat
+ GHC.RTS.Flags: [stkChunkSize] :: GCFlags -> RtsNat
- GHC.RTS.Flags: [tickInterval] :: MiscFlags -> Time
+ GHC.RTS.Flags: [tickInterval] :: MiscFlags -> RtsTime
- Prelude: class Functor f => Applicative f where a1 *> a2 = (id <$ a1) <*> a2 (<*) = liftA2 const
+ Prelude: class Functor f => Applicative f
- Prelude: class Enum a where succ = toEnum . (+ 1) . fromEnum pred = toEnum . (subtract 1) . fromEnum enumFrom x = map toEnum [fromEnum x .. ] enumFromThen x y = map toEnum [fromEnum x, fromEnum y .. ] enumFromTo x y = map toEnum [fromEnum x .. fromEnum y] enumFromThenTo x1 x2 y = map toEnum [fromEnum x1, fromEnum x2 .. fromEnum y]
+ Prelude: class Enum a
- Prelude: class (Fractional a) => Floating a where x ** y = exp (log x * y) logBase x y = log y / log x sqrt x = x ** 0.5 tan x = sin x / cos x tanh x = sinh x / cosh x
+ Prelude: class (Fractional a) => Floating a
- Prelude: class Foldable t where fold = foldMap id foldMap f = foldr (mappend . f) mempty foldr f z t = appEndo (foldMap (Endo #. f) t) z foldr' f z0 xs = foldl f' id xs z0 where f' k x z = k $! f x z foldl f z t = appEndo (getDual (foldMap (Dual . Endo . flip f) t)) z foldl' f z0 xs = foldr f' id xs z0 where f' x k z = k $! f z x foldr1 f xs = fromMaybe (error "foldr1: empty structure") (foldr mf Nothing xs) where mf x m = Just (case m of { Nothing -> x Just y -> f x y }) foldl1 f xs = fromMaybe (error "foldl1: empty structure") (foldl mf Nothing xs) where mf m y = Just (case m of { Nothing -> y Just x -> f x y }) toList t = build (\ c n -> foldr c n t) null = foldr (\ _ _ -> False) True length = foldl' (\ c _ -> c + 1) 0 elem = any . (==) maximum = fromMaybe (error "maximum: empty structure") . getMax . foldMap (Max #. (Just :: a -> Maybe a)) minimum = fromMaybe (error "minimum: empty structure") . getMin . foldMap (Min #. (Just :: a -> Maybe a)) sum = getSum #. foldMap Sum product = getProduct #. foldMap Product
+ Prelude: class Foldable t
- Prelude: class (Num a) => Fractional a where recip x = 1 / x x / y = x * recip y
+ Prelude: class (Num a) => Fractional a
- Prelude: class Functor f where (<$) = fmap . const
+ Prelude: class Functor f
- Prelude: class (Real a, Enum a) => Integral a where n `quot` d = q where (q, _) = quotRem n d n `rem` d = r where (_, r) = quotRem n d n `div` d = q where (q, _) = divMod n d n `mod` d = r where (_, r) = divMod n d divMod n d = if signum r == negate (signum d) then (q - 1, r + d) else qr where qr@(q, r) = quotRem n d
+ Prelude: class (Real a, Enum a) => Integral a
- Prelude: class Applicative m => Monad m where m >> k = m >>= \ _ -> k return = pure fail s = error s
+ Prelude: class Applicative m => Monad m
- Prelude: class Monoid a where mconcat = foldr mappend mempty
+ Prelude: class Monoid a
- Prelude: class Num a where x - y = x + negate y negate x = 0 - x
+ Prelude: class Num a
- Prelude: class Read a where readsPrec = readPrec_to_S readPrec readList = readPrec_to_S (list readPrec) 0 readPrec = readS_to_Prec readsPrec readListPrec = readS_to_Prec (\ _ -> readList)
+ Prelude: class Read a
- Prelude: class (RealFrac a, Floating a) => RealFloat a where exponent x = if m == 0 then 0 else n + floatDigits x where (m, n) = decodeFloat x significand x = encodeFloat m (negate (floatDigits x)) where (m, _) = decodeFloat x scaleFloat 0 x = x scaleFloat k x | isFix = x | otherwise = encodeFloat m (n + clamp b k) where (m, n) = decodeFloat x (l, h) = floatRange x d = floatDigits x b = h - l + 4 * d isFix = x == 0 || isNaN x || isInfinite x atan2 y x | x > 0 = atan (y / x) | x == 0 && y > 0 = pi / 2 | x < 0 && y > 0 = pi + atan (y / x) | (x <= 0 && y < 0) || (x < 0 && isNegativeZero y) || (isNegativeZero x && isNegativeZero y) = - atan2 (- y) x | y == 0 && (x < 0 || isNegativeZero x) = pi | x == 0 && y == 0 = y | otherwise = x + y
+ Prelude: class (RealFrac a, Floating a) => RealFloat a
- Prelude: class (Real a, Fractional a) => RealFrac a where truncate x = m where (m, _) = properFraction x round x = let (n, r) = properFraction x m = if r < 0 then n - 1 else n + 1 in case signum (abs r - 0.5) of { -1 -> n 0 -> if even n then n else m 1 -> m _ -> error "round default defn: Bad value" } ceiling x = if r > 0 then n + 1 else n where (n, r) = properFraction x floor x = if r < 0 then n - 1 else n where (n, r) = properFraction x
+ Prelude: class (Real a, Fractional a) => RealFrac a
- Prelude: class Show a where showsPrec _ x s = show x ++ s show x = shows x "" showList ls s = showList__ shows ls s
+ Prelude: class Show a
- Prelude: class (Functor t, Foldable t) => Traversable t where traverse f = sequenceA . fmap f sequenceA = traverse id mapM = traverse sequence = sequenceA
+ Prelude: class (Functor t, Foldable t) => Traversable t
- Text.Printf: class PrintfArg a where parseFormat _ (c : cs) = FormatParse "" c cs parseFormat _ "" = errorShortFormat
+ Text.Printf: class PrintfArg a
- Text.Read: class Read a where readsPrec = readPrec_to_S readPrec readList = readPrec_to_S (list readPrec) 0 readPrec = readS_to_Prec readsPrec readListPrec = readS_to_Prec (\ _ -> readList)
+ Text.Read: class Read a
- Text.Show: class Show a where showsPrec _ x s = show x ++ s show x = shows x "" showList ls s = showList__ shows ls s
+ Text.Show: class Show a

Files

Data/Bits.hs view
@@ -515,8 +515,12 @@    complement = complementInteger    shift x i@(I# i#) | i >= 0    = shiftLInteger x i#                      | otherwise = shiftRInteger x (negateInt# i#)-   shiftL x (I# i#) = shiftLInteger x i#-   shiftR x (I# i#) = shiftRInteger x i#+   shiftL x i@(I# i#)+     | i < 0        = error "Bits.shiftL(Integer): negative shift"+     | otherwise    = shiftLInteger x i#+   shiftR x i@(I# i#)+     | i < 0        = error "Bits.shiftR(Integer): negative shift"+     | otherwise    = shiftRInteger x i#     testBit x (I# i) = testBitInteger x i 
GHC/ForeignPtr.hs view
@@ -250,12 +250,19 @@ -- finalizer will run /before/ all other finalizers for the same -- object which have already been registered. addForeignPtrFinalizer (FunPtr fp) (ForeignPtr p c) = case c of-  PlainForeignPtr r -> f r >> return ()-  MallocPtr     _ r -> f r >> return ()+  PlainForeignPtr r -> insertCFinalizer r fp 0# nullAddr# p ()+  MallocPtr     _ r -> insertCFinalizer r fp 0# nullAddr# p c   _ -> error "GHC.ForeignPtr: attempt to add a finalizer to a plain pointer"- where-    f r = insertCFinalizer r fp 0# nullAddr# p +-- Note [MallocPtr finalizers] (#10904)+--+-- When we have C finalizers for a MallocPtr, the memory is+-- heap-resident and would normally be recovered by the GC before the+-- finalizers run.  To prevent the memory from being reused too early,+-- we attach the MallocPtr constructor to the "value" field of the+-- weak pointer when we call mkWeak# in ensureCFinalizerWeak below.+-- The GC will keep this field alive until the finalizers have run.+ addForeignPtrFinalizerEnv ::   FinalizerEnvPtr env a -> Ptr env -> ForeignPtr a -> IO () -- ^ Like 'addForeignPtrFinalizerEnv' but allows the finalizer to be@@ -263,11 +270,9 @@ -- finalizer.  The environment passed to the finalizer is fixed by the -- second argument to 'addForeignPtrFinalizerEnv' addForeignPtrFinalizerEnv (FunPtr fp) (Ptr ep) (ForeignPtr p c) = case c of-  PlainForeignPtr r -> f r >> return ()-  MallocPtr     _ r -> f r >> return ()+  PlainForeignPtr r -> insertCFinalizer r fp 1# ep p ()+  MallocPtr     _ r -> insertCFinalizer r fp 1# ep p c   _ -> error "GHC.ForeignPtr: attempt to add a finalizer to a plain pointer"- where-    f r = insertCFinalizer r fp 1# ep p  addForeignPtrConcFinalizer :: ForeignPtr a -> IO () -> IO () -- ^This function adds a finalizer to the given @ForeignPtr@.  The@@ -319,9 +324,9 @@ data MyWeak = MyWeak (Weak# ())  insertCFinalizer ::-  IORef Finalizers -> Addr# -> Int# -> Addr# -> Addr# -> IO ()-insertCFinalizer r fp flag ep p = do-  MyWeak w <- ensureCFinalizerWeak r+  IORef Finalizers -> Addr# -> Int# -> Addr# -> Addr# -> value -> IO ()+insertCFinalizer r fp flag ep p val = do+  MyWeak w <- ensureCFinalizerWeak r val   IO $ \s -> case addCFinalizerToWeak# fp p flag ep w s of       (# s1, 1# #) -> (# s1, () #) @@ -329,16 +334,17 @@       -- has finalized w by calling foreignPtrFinalizer. We retry now.       -- This won't be an infinite loop because that thread must have       -- replaced the content of r before calling finalizeWeak#.-      (# s1, _ #) -> unIO (insertCFinalizer r fp flag ep p) s1+      (# s1, _ #) -> unIO (insertCFinalizer r fp flag ep p val) s1 -ensureCFinalizerWeak :: IORef Finalizers -> IO MyWeak-ensureCFinalizerWeak ref@(IORef (STRef r#)) = do+ensureCFinalizerWeak :: IORef Finalizers -> value -> IO MyWeak+ensureCFinalizerWeak ref@(IORef (STRef r#)) value = do   fin <- readIORef ref   case fin of       CFinalizers weak -> return (MyWeak weak)       HaskellFinalizers{} -> noMixingError       NoFinalizers -> IO $ \s ->-          case mkWeakNoFinalizer# r# () s of { (# s1, w #) ->+          case mkWeakNoFinalizer# r# (unsafeCoerce# value) s of { (# s1, w #) ->+             -- See Note [MallocPtr finalizers] (#10904)           case atomicModifyMutVar# r# (update w) s1 of               { (# s2, (weak, needKill ) #) ->           if needKill
GHC/IO.hs view
@@ -436,8 +436,9 @@ mask io = do   b <- getMaskingState   case b of-    Unmasked -> block $ io unblock-    _        -> io id+    Unmasked              -> block $ io unblock+    MaskedInterruptible   -> io block+    MaskedUninterruptible -> io blockUninterruptible  uninterruptibleMask_ io = uninterruptibleMask $ \_ -> io @@ -446,7 +447,7 @@   case b of     Unmasked              -> blockUninterruptible $ io unblock     MaskedInterruptible   -> blockUninterruptible $ io block-    MaskedUninterruptible -> io id+    MaskedUninterruptible -> io blockUninterruptible  bracket         :: IO a         -- ^ computation to run first (\"acquire resource\")
GHC/List.hs view
@@ -355,9 +355,11 @@ -- and thus must be applied to non-empty lists.  foldr1                  :: (a -> a -> a) -> [a] -> a-foldr1 _ [x]            =  x-foldr1 f (x:xs)         =  f x (foldr1 f xs)-foldr1 _ []             =  errorEmptyList "foldr1"+foldr1 f = go+  where go [x]            =  x+        go (x:xs)         =  f x (go xs)+        go []             =  errorEmptyList "foldr1"+{-# INLINE [0] foldr1 #-}  -- | 'scanr' is the right-to-left dual of 'scanl'. -- Note that
GHC/RTS/Flags.hsc view
@@ -9,13 +9,19 @@ -- @since 4.8.0.0 -- module GHC.RTS.Flags-  ( RTSFlags (..)+  ( RtsTime+  , RtsNat+  , RTSFlags (..)+  , GiveGCStats (..)   , GCFlags (..)   , ConcFlags (..)   , MiscFlags (..)   , DebugFlags (..)+  , DoCostCentres (..)   , CCFlags (..)+  , DoHeapProfile (..)   , ProfFlags (..)+  , DoTrace (..)   , TraceFlags (..)   , TickyFlags (..)   , getRTSFlags@@ -48,11 +54,19 @@ import GHC.Word  -- | @'Time'@ is defined as a @'StgWord64'@ in @stg/Types.h@-type Time = Word64+--+-- @since 4.8.2.0+type RtsTime = Word64  -- | @'nat'@ defined in @rts/Types.h@-type Nat = #{type unsigned int}+--+-- @since 4.8.2.0+type RtsNat = #{type unsigned int} +-- | Should we produce a summary of the garbage collector statistics after the+-- program has exited?+--+-- @since 4.8.2.0 data GiveGCStats     = NoGCStats     | CollectGCStats@@ -75,22 +89,25 @@     toEnum #{const VERBOSE_GC_STATS} = VerboseGCStats     toEnum e = error ("invalid enum for GiveGCStats: " ++ show e) +-- | Parameters of the garbage collector.+--+-- @since 4.8.0.0 data GCFlags = GCFlags     { statsFile             :: Maybe FilePath     , giveStats             :: GiveGCStats-    , maxStkSize            :: Nat-    , initialStkSize        :: Nat-    , stkChunkSize          :: Nat-    , stkChunkBufferSize    :: Nat-    , maxHeapSize           :: Nat-    , minAllocAreaSize      :: Nat-    , minOldGenSize         :: Nat-    , heapSizeSuggestion    :: Nat+    , maxStkSize            :: RtsNat+    , initialStkSize        :: RtsNat+    , stkChunkSize          :: RtsNat+    , stkChunkBufferSize    :: RtsNat+    , maxHeapSize           :: RtsNat+    , minAllocAreaSize      :: RtsNat+    , minOldGenSize         :: RtsNat+    , heapSizeSuggestion    :: RtsNat     , heapSizeSuggestionAuto :: Bool     , oldGenFactor          :: Double     , pcFreeHeap            :: Double-    , generations           :: Nat-    , steps                 :: Nat+    , generations           :: RtsNat+    , steps                 :: RtsNat     , squeezeUpdFrames      :: Bool     , compact               :: Bool -- ^ True <=> "compact all the time"     , compactThreshold      :: Double@@ -98,19 +115,25 @@       -- ^ use "mostly mark-sweep" instead of copying for the oldest generation     , ringBell              :: Bool     , frontpanel            :: Bool-    , idleGCDelayTime       :: Time+    , idleGCDelayTime       :: RtsTime     , doIdleGC              :: Bool     , heapBase              :: Word -- ^ address to ask the OS for memory     , allocLimitGrace       :: Word     } deriving (Show) +-- | Parameters concerning context switching+--+-- @since 4.8.0.0 data ConcFlags = ConcFlags-    { ctxtSwitchTime  :: Time+    { ctxtSwitchTime  :: RtsTime     , ctxtSwitchTicks :: Int     } deriving (Show) +-- | Miscellaneous parameters+--+-- @since 4.8.0.0 data MiscFlags = MiscFlags-    { tickInterval          :: Time+    { tickInterval          :: RtsTime     , installSignalHandlers :: Bool     , machineReadable       :: Bool     , linkerMemBase         :: Word@@ -119,6 +142,8 @@  -- | Flags to control debugging output & extra checking in various -- subsystems.+--+-- @since 4.8.0.0 data DebugFlags = DebugFlags     { scheduler   :: Bool -- ^ 's'     , interpreter :: Bool -- ^ 'i'@@ -137,6 +162,9 @@     , sparks      :: Bool -- ^ 'r'     } deriving (Show) +-- | Should the RTS produce a cost-center summary?+--+-- @since 4.8.2.0 data DoCostCentres     = CostCentresNone     | CostCentresSummary@@ -159,12 +187,18 @@     toEnum #{const COST_CENTRES_XML}     = CostCentresXML     toEnum e = error ("invalid enum for DoCostCentres: " ++ show e) +-- | Parameters pertaining to the cost-center profiler.+--+-- @since 4.8.0.0 data CCFlags = CCFlags     { doCostCentres :: DoCostCentres     , profilerTicks :: Int     , msecsPerTick  :: Int     } deriving (Show) +-- | What sort of heap profile are we collecting?+--+-- @since 4.8.2.0 data DoHeapProfile     = NoHeapProfiling     | HeapByCCS@@ -196,10 +230,13 @@     toEnum #{const HEAP_BY_CLOSURE_TYPE} = HeapByClosureType     toEnum e = error ("invalid enum for DoHeapProfile: " ++ show e) +-- | Parameters of the cost-center profiler+--+-- @since 4.8.0.0 data ProfFlags = ProfFlags     { doHeapProfile            :: DoHeapProfile-    , heapProfileInterval      :: Time -- ^ time between samples-    , heapProfileIntervalTicks :: Word -- ^ ticks between samples (derived)+    , heapProfileInterval      :: RtsTime -- ^ time between samples+    , heapProfileIntervalTicks :: Word    -- ^ ticks between samples (derived)     , includeTSOs              :: Bool     , showCCSOnException       :: Bool     , maxRetainerSetSize       :: Word@@ -213,10 +250,13 @@     , bioSelector              :: Maybe String     } deriving (Show) +-- | Is event tracing enabled?+--+-- @since 4.8.2.0 data DoTrace-    = TraceNone-    | TraceEventLog-    | TraceStderr+    = TraceNone      -- ^ no tracing+    | TraceEventLog  -- ^ send tracing events to the event log+    | TraceStderr    -- ^ send tracing events to @stderr@     deriving (Show)  instance Enum DoTrace where@@ -229,6 +269,9 @@     toEnum #{const TRACE_STDERR}   = TraceStderr     toEnum e = error ("invalid enum for DoTrace: " ++ show e) +-- | Parameters pertaining to event tracing+--+-- @since 4.8.0.0 data TraceFlags = TraceFlags     { tracing        :: DoTrace     , timestamp      :: Bool -- ^ show timestamp in stderr output@@ -239,11 +282,17 @@     , user           :: Bool -- ^ trace user events (emitted from Haskell code)     } deriving (Show) +-- | Parameters pertaining to ticky-ticky profiler+--+-- @since 4.8.0.0 data TickyFlags = TickyFlags     { showTickyStats :: Bool     , tickyFile      :: Maybe FilePath     } deriving (Show) +-- | Parameters of the runtime system+--+-- @since 4.8.0.0 data RTSFlags = RTSFlags     { gcFlags         :: GCFlags     , concurrentFlags :: ConcFlags@@ -305,7 +354,7 @@   ptr <- getGcFlagsPtr   GCFlags <$> (peekFilePath =<< #{peek GC_FLAGS, statsFile} ptr)           <*> (toEnum . fromIntegral <$>-                (#{peek GC_FLAGS, giveStats} ptr :: IO Nat))+                (#{peek GC_FLAGS, giveStats} ptr :: IO RtsNat))           <*> #{peek GC_FLAGS, maxStkSize} ptr           <*> #{peek GC_FLAGS, initialStkSize} ptr           <*> #{peek GC_FLAGS, stkChunkSize} ptr@@ -367,7 +416,7 @@ getCCFlags = do   ptr <- getCcFlagsPtr   CCFlags <$> (toEnum . fromIntegral-                <$> (#{peek COST_CENTRE_FLAGS, doCostCentres} ptr :: IO Nat))+                <$> (#{peek COST_CENTRE_FLAGS, doCostCentres} ptr :: IO RtsNat))           <*> #{peek COST_CENTRE_FLAGS, profilerTicks} ptr           <*> #{peek COST_CENTRE_FLAGS, msecsPerTick} ptr 
base.cabal view
@@ -1,5 +1,5 @@ name:           base-version:        4.8.1.0+version:        4.8.2.0 -- NOTE: Don't forget to update ./changelog.md license:        BSD3 license-file:   LICENSE
changelog.md view
@@ -1,5 +1,15 @@ # Changelog for [`base` package](http://hackage.haskell.org/package/base) +## 4.8.2.0  *Oct 2015*++  * Bundled with GHC 7.10.3++  * The restore operation provided by `mask` and `uninterruptibleMask` now+    restores the previous masking state whatever the current masking state is.++  * Exported `GiveGCStats`, `DoCostCentres`, `DoHeapProfile`, `DoTrace`,+    `RtsTime`, and `RtsNat` from `GHC.RTS.Flags`+ ## 4.8.1.0  *Jul 2015*    * Bundled with GHC 7.10.2