Skip to content

Commit

Permalink
Mark DEPRECATED pragmas with when they were added
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian Lynagh committed Feb 16, 2013
1 parent f231a01 commit 9bc15ea
Show file tree
Hide file tree
Showing 18 changed files with 28 additions and 34 deletions.
4 changes: 2 additions & 2 deletions Control/Concurrent/Chan.hs
Expand Up @@ -142,7 +142,7 @@ unGetChan (Chan readVar _) val = do
modifyMVar_ readVar $ \read_end -> do modifyMVar_ readVar $ \read_end -> do
putMVar new_read_end (ChItem val read_end) putMVar new_read_end (ChItem val read_end)
return new_read_end return new_read_end
{-# DEPRECATED unGetChan "if you need this operation, use Control.Concurrent.STM.TChan instead. See http://hackage.haskell.org/trac/ghc/ticket/4154 for details" #-} {-# DEPRECATED unGetChan "if you need this operation, use Control.Concurrent.STM.TChan instead. See http://hackage.haskell.org/trac/ghc/ticket/4154 for details" #-} -- deprecated in 7.0


-- |Returns 'True' if the supplied 'Chan' is empty. -- |Returns 'True' if the supplied 'Chan' is empty.
isEmptyChan :: Chan a -> IO Bool isEmptyChan :: Chan a -> IO Bool
Expand All @@ -151,7 +151,7 @@ isEmptyChan (Chan readVar writeVar) = do
w <- readMVar writeVar w <- readMVar writeVar
let eq = r == w let eq = r == w
eq `seq` return eq eq `seq` return eq
{-# DEPRECATED isEmptyChan "if you need this operation, use Control.Concurrent.STM.TChan instead. See http://hackage.haskell.org/trac/ghc/ticket/4154 for details" #-} {-# DEPRECATED isEmptyChan "if you need this operation, use Control.Concurrent.STM.TChan instead. See http://hackage.haskell.org/trac/ghc/ticket/4154 for details" #-} -- deprecated in 7.0


-- Operators for interfacing with functional streams. -- Operators for interfacing with functional streams.


Expand Down
2 changes: 1 addition & 1 deletion Control/Concurrent/MVar.hs
Expand Up @@ -263,7 +263,7 @@ modifyMVarMasked m io =
putMVar m a' putMVar m a'
return b return b


{-# DEPRECATED addMVarFinalizer "use mkWeakMVar instead" #-} {-# DEPRECATED addMVarFinalizer "use mkWeakMVar instead" #-} -- deprecated in 7.6
addMVarFinalizer :: MVar a -> IO () -> IO () addMVarFinalizer :: MVar a -> IO () -> IO ()
addMVarFinalizer = GHC.MVar.addMVarFinalizer addMVarFinalizer = GHC.MVar.addMVarFinalizer


Expand Down
2 changes: 1 addition & 1 deletion Control/Monad/Instances.hs
Expand Up @@ -16,5 +16,5 @@
-- 'Functor' instances for @(,) a@ and @'Either' a@. -- 'Functor' instances for @(,) a@ and @'Either' a@.


module Control.Monad.Instances (Functor(..),Monad(..)) where module Control.Monad.Instances (Functor(..),Monad(..)) where

-- module DEPRECATED -- deprecated in 7.6
import Prelude import Prelude
4 changes: 1 addition & 3 deletions Control/Monad/ST.hs
Expand Up @@ -39,9 +39,7 @@ module Control.Monad.ST (
import Control.Monad.ST.Safe import Control.Monad.ST.Safe
import qualified Control.Monad.ST.Unsafe as U import qualified Control.Monad.ST.Unsafe as U


{-# DEPRECATED unsafeInterleaveST, unsafeIOToST, unsafeSTToIO {-# DEPRECATED unsafeInterleaveST, unsafeIOToST, unsafeSTToIO "Please import from Control.Monad.ST.Unsafe instead; This will be removed in the next release" #-} -- deprecated in 7.2
"Please import from Control.Monad.ST.Unsafe instead; This will be removed in the next release"
#-}


{-# INLINE unsafeInterleaveST #-} {-# INLINE unsafeInterleaveST #-}
unsafeInterleaveST :: ST s a -> ST s a unsafeInterleaveST :: ST s a -> ST s a
Expand Down
4 changes: 1 addition & 3 deletions Control/Monad/ST/Lazy.hs
Expand Up @@ -37,9 +37,7 @@ module Control.Monad.ST.Lazy (
import Control.Monad.ST.Lazy.Safe import Control.Monad.ST.Lazy.Safe
import qualified Control.Monad.ST.Lazy.Unsafe as U import qualified Control.Monad.ST.Lazy.Unsafe as U


{-# DEPRECATED unsafeInterleaveST, unsafeIOToST {-# DEPRECATED unsafeInterleaveST, unsafeIOToST "Please import from Control.Monad.ST.Lazy.Unsafe instead; This will be removed in the next release" #-} -- deprecated in 7.2
"Please import from Control.Monad.ST.Lazy.Unsafe instead; This will be removed in the next release"
#-}


{-# INLINE unsafeInterleaveST #-} {-# INLINE unsafeInterleaveST #-}
unsafeInterleaveST :: ST s a -> ST s a unsafeInterleaveST :: ST s a -> ST s a
Expand Down
2 changes: 1 addition & 1 deletion Data/Bits.hs
Expand Up @@ -69,7 +69,7 @@ infixl 7 .&.
infixl 6 `xor` infixl 6 `xor`
infixl 5 .|. infixl 5 .|.


{-# DEPRECATED bitSize "Use bitSizeMaybe or finiteBitSize instead" #-} {-# DEPRECATED bitSize "Use bitSizeMaybe or finiteBitSize instead" #-} -- deprecated in 7.8


{-| {-|
The 'Bits' class defines bitwise operations over integral types. The 'Bits' class defines bitwise operations over integral types.
Expand Down
6 changes: 3 additions & 3 deletions Data/OldTypeable.hs
Expand Up @@ -30,7 +30,7 @@
-- --
----------------------------------------------------------------------------- -----------------------------------------------------------------------------


module Data.OldTypeable {-# DEPRECATED "Use Data.Typeable instead" #-} module Data.OldTypeable {-# DEPRECATED "Use Data.Typeable instead" #-} -- deprecated in 7.8
( (


-- * The Typeable class -- * The Typeable class
Expand Down Expand Up @@ -121,7 +121,7 @@ import Hugs.ConcBase ( MVar )


#include "OldTypeable.h" #include "OldTypeable.h"


{-# DEPRECATED typeRepKey "TypeRep itself is now an instance of Ord" #-} {-# DEPRECATED typeRepKey "TypeRep itself is now an instance of Ord" #-} -- deprecated in 7.2
-- | (DEPRECATED) Returns a unique key associated with a 'TypeRep'. -- | (DEPRECATED) Returns a unique key associated with a 'TypeRep'.
-- This function is deprecated because 'TypeRep' itself is now an -- This function is deprecated because 'TypeRep' itself is now an
-- instance of 'Ord', so mappings can be made directly with 'TypeRep' -- instance of 'Ord', so mappings can be made directly with 'TypeRep'
Expand All @@ -146,7 +146,7 @@ newtype TypeRepKey = TypeRepKey Fingerprint


----------------- Construction --------------------- ----------------- Construction ---------------------


{-# DEPRECATED mkTyCon "either derive Typeable, or use mkTyCon3 instead" #-} {-# DEPRECATED mkTyCon "either derive Typeable, or use mkTyCon3 instead" #-} -- deprecated in 7.2
-- | Backwards-compatible API -- | Backwards-compatible API
mkTyCon :: String -- ^ unique string mkTyCon :: String -- ^ unique string
-> TyCon -- ^ A unique 'TyCon' object -> TyCon -- ^ A unique 'TyCon' object
Expand Down
4 changes: 2 additions & 2 deletions Data/OldTypeable/Internal.hs
Expand Up @@ -22,7 +22,7 @@
{-# LANGUAGE DeriveDataTypeable, StandaloneDeriving #-} {-# LANGUAGE DeriveDataTypeable, StandaloneDeriving #-}
#endif #endif


module Data.OldTypeable.Internal {-# DEPRECATED "Use Data.Typeable.Internal instead" #-} ( module Data.OldTypeable.Internal {-# DEPRECATED "Use Data.Typeable.Internal instead" #-} ( -- deprecated in 7.8
TypeRep(..), TypeRep(..),
TyCon(..), TyCon(..),
mkTyCon, mkTyCon,
Expand Down Expand Up @@ -189,7 +189,7 @@ typeRepArgs :: TypeRep -> [TypeRep]
typeRepArgs (TypeRep _ _ args) = args typeRepArgs (TypeRep _ _ args) = args


-- | Observe string encoding of a type representation -- | Observe string encoding of a type representation
{-# DEPRECATED tyConString "renamed to tyConName; tyConModule and tyConPackage are also available." #-} {-# DEPRECATED tyConString "renamed to tyConName; tyConModule and tyConPackage are also available." #-} -- deprecated in 7.4
tyConString :: TyCon -> String tyConString :: TyCon -> String
tyConString = tyConName tyConString = tyConName


Expand Down
2 changes: 1 addition & 1 deletion Data/Typeable/Internal.hs
Expand Up @@ -178,7 +178,7 @@ typeRepArgs :: TypeRep -> [TypeRep]
typeRepArgs (TypeRep _ _ args) = args typeRepArgs (TypeRep _ _ args) = args


-- | Observe string encoding of a type representation -- | Observe string encoding of a type representation
{-# DEPRECATED tyConString "renamed to tyConName; tyConModule and tyConPackage are also available." #-} {-# DEPRECATED tyConString "renamed to tyConName; tyConModule and tyConPackage are also available." #-} -- deprecated in 7.4
tyConString :: TyCon -> String tyConString :: TyCon -> String
tyConString = tyConName tyConString = tyConName


Expand Down
2 changes: 1 addition & 1 deletion Debug/Trace.hs
Expand Up @@ -86,7 +86,7 @@ foreign import ccall unsafe "HsBase.h debugBelch2"
-- | Deprecated. Use 'traceIO'. -- | Deprecated. Use 'traceIO'.
putTraceMsg :: String -> IO () putTraceMsg :: String -> IO ()
putTraceMsg = traceIO putTraceMsg = traceIO
{-# DEPRECATED putTraceMsg "Use Debug.Trace.traceIO" #-} {-# DEPRECATED putTraceMsg "Use Debug.Trace.traceIO" #-} -- deprecated in 7.4




{-# NOINLINE trace #-} {-# NOINLINE trace #-}
Expand Down
2 changes: 1 addition & 1 deletion Foreign.hs
Expand Up @@ -47,7 +47,7 @@ import Foreign.Marshal
import GHC.IO (IO) import GHC.IO (IO)
import qualified GHC.IO (unsafePerformIO) import qualified GHC.IO (unsafePerformIO)


{-# DEPRECATED unsafePerformIO "Use System.IO.Unsafe.unsafePerformIO instead; This function will be removed in the next release" #-} {-# DEPRECATED unsafePerformIO "Use System.IO.Unsafe.unsafePerformIO instead; This function will be removed in the next release" #-} -- deprecated in 7.2


{-# INLINE unsafePerformIO #-} {-# INLINE unsafePerformIO #-}
unsafePerformIO :: IO a -> a unsafePerformIO :: IO a -> a
Expand Down
2 changes: 1 addition & 1 deletion Foreign/ForeignPtr.hs
Expand Up @@ -57,7 +57,7 @@ import Foreign.ForeignPtr.Safe
import Foreign.Ptr ( Ptr ) import Foreign.Ptr ( Ptr )
import qualified Foreign.ForeignPtr.Unsafe as U import qualified Foreign.ForeignPtr.Unsafe as U


{-# DEPRECATED unsafeForeignPtrToPtr "Use Foreign.ForeignPtr.Unsafe.unsafeForeignPtrToPtr instead; This function will be removed in the next release" #-} {-# DEPRECATED unsafeForeignPtrToPtr "Use Foreign.ForeignPtr.Unsafe.unsafeForeignPtrToPtr instead; This function will be removed in the next release" #-} -- deprecated in 7.2
{-# INLINE unsafeForeignPtrToPtr #-} {-# INLINE unsafeForeignPtrToPtr #-}
unsafeForeignPtrToPtr :: ForeignPtr a -> Ptr a unsafeForeignPtrToPtr :: ForeignPtr a -> Ptr a
unsafeForeignPtrToPtr = U.unsafeForeignPtrToPtr unsafeForeignPtrToPtr = U.unsafeForeignPtrToPtr
Expand Down
4 changes: 1 addition & 3 deletions Foreign/Marshal.hs
Expand Up @@ -50,9 +50,7 @@ results in undefined behaviour.
It is expected that this operation will be It is expected that this operation will be
replaced in a future revision of Haskell. replaced in a future revision of Haskell.
-} -}
{-# DEPRECATED unsafeLocalState {-# DEPRECATED unsafeLocalState "Please import from Foreign.Marshall.Unsafe instead; This will be removed in the next release" #-} -- deprecated in 7.2
"Please import from Foreign.Marshall.Unsafe instead; This will be removed in the next release"
#-}
unsafeLocalState :: IO a -> a unsafeLocalState :: IO a -> a
unsafeLocalState = unsafePerformIO unsafeLocalState = unsafePerformIO


2 changes: 1 addition & 1 deletion Foreign/Marshal/Error.hs
Expand Up @@ -81,4 +81,4 @@ throwIfNull = throwIf (== nullPtr) . const
-- --
void :: IO a -> IO () void :: IO a -> IO ()
void act = act >> return () void act = act >> return ()
{-# DEPRECATED void "use Control.Monad.void instead" #-} {-# DEPRECATED void "use Control.Monad.void instead" #-} -- deprecated in 7.6
8 changes: 4 additions & 4 deletions GHC/Conc/Sync.lhs
Expand Up @@ -45,7 +45,7 @@ module GHC.Conc.Sync
, forkIOUnmasked , forkIOUnmasked
, forkIOWithUnmask , forkIOWithUnmask
, forkOn , forkOn
, forkOnIO -- DEPRECATED , forkOnIO -- DEPRECATED -- deprecated in 7.2
, forkOnIOUnmasked , forkOnIOUnmasked
, forkOnWithUnmask , forkOnWithUnmask
, numCapabilities , numCapabilities
Expand Down Expand Up @@ -208,7 +208,7 @@ forkIO action = IO $ \ s ->
where where
action_plus = catchException action childHandler action_plus = catchException action childHandler
{-# DEPRECATED forkIOUnmasked "use forkIOWithUnmask instead" #-} {-# DEPRECATED forkIOUnmasked "use forkIOWithUnmask instead" #-} -- deprecated in 7.2
-- | This function is deprecated; use 'forkIOWithUnmask' instead -- | This function is deprecated; use 'forkIOWithUnmask' instead
forkIOUnmasked :: IO () -> IO ThreadId forkIOUnmasked :: IO () -> IO ThreadId
forkIOUnmasked io = forkIO (unsafeUnmask io) forkIOUnmasked io = forkIO (unsafeUnmask io)
Expand Down Expand Up @@ -258,12 +258,12 @@ forkOn (I# cpu) action = IO $ \ s ->
where where
action_plus = catchException action childHandler action_plus = catchException action childHandler
{-# DEPRECATED forkOnIO "renamed to forkOn" #-} {-# DEPRECATED forkOnIO "renamed to forkOn" #-} -- deprecated in 7.2
-- | This function is deprecated; use 'forkOn' instead -- | This function is deprecated; use 'forkOn' instead
forkOnIO :: Int -> IO () -> IO ThreadId forkOnIO :: Int -> IO () -> IO ThreadId
forkOnIO = forkOn forkOnIO = forkOn
{-# DEPRECATED forkOnIOUnmasked "use forkOnWithUnmask instead" #-} {-# DEPRECATED forkOnIOUnmasked "use forkOnWithUnmask instead" #-} -- deprecated in 7.2
-- | This function is deprecated; use 'forkOnWIthUnmask' instead -- | This function is deprecated; use 'forkOnWIthUnmask' instead
forkOnIOUnmasked :: Int -> IO () -> IO ThreadId forkOnIOUnmasked :: Int -> IO () -> IO ThreadId
forkOnIOUnmasked cpu io = forkOn cpu (unsafeUnmask io) forkOnIOUnmasked cpu io = forkOn cpu (unsafeUnmask io)
Expand Down
2 changes: 1 addition & 1 deletion GHC/Exts.hs
Expand Up @@ -113,7 +113,7 @@ groupByFB c n eq xs0 = groupByFBCore xs0


traceEvent :: String -> IO () traceEvent :: String -> IO ()
traceEvent = Debug.Trace.traceEventIO traceEvent = Debug.Trace.traceEventIO
{-# DEPRECATED traceEvent "Use Debug.Trace.traceEvent or Debug.Trace.traceEventIO" #-} {-# DEPRECATED traceEvent "Use Debug.Trace.traceEvent or Debug.Trace.traceEventIO" #-} -- deprecated in 7.4




{- ********************************************************************** {- **********************************************************************
Expand Down
4 changes: 2 additions & 2 deletions GHC/Generics.hs
Expand Up @@ -105,8 +105,8 @@ data P
type Rec0 = K1 R type Rec0 = K1 R
-- | Type synonym for encoding parameters (other than the last) -- | Type synonym for encoding parameters (other than the last)
type Par0 = K1 P type Par0 = K1 P
{-# DEPRECATED Par0 "Par0 is no longer used; use Rec0 instead" #-} {-# DEPRECATED Par0 "Par0 is no longer used; use Rec0 instead" #-} -- deprecated in 7.6
{-# DEPRECATED P "P is no longer used; use R instead" #-} {-# DEPRECATED P "P is no longer used; use R instead" #-} -- deprecated in 7.6


-- | Tag for M1: datatype -- | Tag for M1: datatype
data D data D
Expand Down
6 changes: 3 additions & 3 deletions GHC/IO.hs
Expand Up @@ -302,7 +302,7 @@ throwIO e = IO (raiseIO# (toException e))
-- ----------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
-- Controlling asynchronous exception delivery -- Controlling asynchronous exception delivery


{-# DEPRECATED block "use Control.Exception.mask instead" #-} {-# DEPRECATED block "use Control.Exception.mask instead" #-} -- deprecated in 7.0
-- | Note: this function is deprecated, please use 'mask' instead. -- | Note: this function is deprecated, please use 'mask' instead.
-- --
-- Applying 'block' to a computation will -- Applying 'block' to a computation will
Expand All @@ -322,7 +322,7 @@ throwIO e = IO (raiseIO# (toException e))
block :: IO a -> IO a block :: IO a -> IO a
block (IO io) = IO $ maskAsyncExceptions# io block (IO io) = IO $ maskAsyncExceptions# io


{-# DEPRECATED unblock "use Control.Exception.mask instead" #-} {-# DEPRECATED unblock "use Control.Exception.mask instead" #-} -- deprecated in 7.0
-- | Note: this function is deprecated, please use 'mask' instead. -- | Note: this function is deprecated, please use 'mask' instead.
-- --
-- To re-enable asynchronous exceptions inside the scope of -- To re-enable asynchronous exceptions inside the scope of
Expand Down Expand Up @@ -358,7 +358,7 @@ getMaskingState = IO $ \s ->
1# -> MaskedUninterruptible 1# -> MaskedUninterruptible
_ -> MaskedInterruptible #) _ -> MaskedInterruptible #)


{-# DEPRECATED blocked "use Control.Exception.getMaskingState instead" #-} {-# DEPRECATED blocked "use Control.Exception.getMaskingState instead" #-} -- deprecated in 7.2
-- | returns True if asynchronous exceptions are blocked in the -- | returns True if asynchronous exceptions are blocked in the
-- current thread. -- current thread.
blocked :: IO Bool blocked :: IO Bool
Expand Down

0 comments on commit 9bc15ea

Please sign in to comment.