It's just an internal GHC library, for now at least
15 files changed:
asyncWriteBA, ConsoleEvent(..), win32ConsoleHandler,
toWin32ConsoleEvent)
#else
asyncWriteBA, ConsoleEvent(..), win32ConsoleHandler,
toWin32ConsoleEvent)
#else
-import qualified System.Event.Thread as Event
+import qualified GHC.Event.Thread as Event
#endif
ensureIOManagerIsRunning :: IO ()
#endif
ensureIOManagerIsRunning :: IO ()
-- descriptors and timeouts.
--
-- This module should be considered GHC internal.
-- descriptors and timeouts.
--
-- This module should be considered GHC internal.
( -- * Types
EventManager
( -- * Types
EventManager
, unregisterTimeout
) where
, unregisterTimeout
) where
-import System.Event.Manager
+import GHC.Event.Manager
{-# LANGUAGE BangPatterns, CPP, ForeignFunctionInterface, NoImplicitPrelude #-}
{-# LANGUAGE BangPatterns, CPP, ForeignFunctionInterface, NoImplicitPrelude #-}
-module System.Event.Array
-- This fugly hack is brought by GHC's apparent reluctance to deal
-- with MagicHash and UnboxedTuples when inferring types. Eek!
#define CHECK_BOUNDS(_func_,_len_,_k_) \
-- This fugly hack is brought by GHC's apparent reluctance to deal
-- with MagicHash and UnboxedTuples when inferring types. Eek!
#define CHECK_BOUNDS(_func_,_len_,_k_) \
-if (_k_) < 0 || (_k_) >= (_len_) then error ("System.Event.Array." ++ (_func_) ++ ": bounds error, index " ++ show (_k_) ++ ", capacity " ++ show (_len_)) else
+if (_k_) < 0 || (_k_) >= (_len_) then error ("GHC.Event.Array." ++ (_func_) ++ ": bounds error, index " ++ show (_k_) ++ ", capacity " ++ show (_len_)) else
#else
#define CHECK_BOUNDS(_func_,_len_,_k_)
#endif
#else
#define CHECK_BOUNDS(_func_,_len_,_k_)
#endif
{-# LANGUAGE NoImplicitPrelude, BangPatterns, ForeignFunctionInterface #-}
{-# LANGUAGE NoImplicitPrelude, BangPatterns, ForeignFunctionInterface #-}
-module System.Event.Clock (getCurrentTime) where
+module GHC.Event.Clock (getCurrentTime) where
-module System.Event.Control
+module GHC.Event.Control
(
-- * Managing the IO manager
Signal
(
-- * Managing the IO manager
Signal
--
-- epoll decouples monitor an fd from the process of registering it.
--
--
-- epoll decouples monitor an fd from the process of registering it.
--
-module System.Event.EPoll
(
new
, available
) where
(
new
, available
) where
-import qualified System.Event.Internal as E
+import qualified GHC.Event.Internal as E
#include "EventConfig.h"
#if !defined(HAVE_EPOLL)
#include "EventConfig.h"
#if !defined(HAVE_EPOLL)
import System.Posix.Internals (setCloseOnExec)
import System.Posix.Types (Fd(..))
import System.Posix.Internals (setCloseOnExec)
import System.Posix.Types (Fd(..))
-import qualified System.Event.Array as A
-import System.Event.Internal (Timeout(..))
+import qualified GHC.Event.Array as A
+import GHC.Event.Internal (Timeout(..))
available :: Bool
available = True
available :: Bool
available = True
-----------------------------------------------------------------------------
-- |
-----------------------------------------------------------------------------
-- |
--- Module : System.Event.IntMap
+-- Module : GHC.Event.IntMap
-- Copyright : (c) Daan Leijen 2002
-- (c) Andriy Palamarchuk 2008
-- License : BSD-style
-- Copyright : (c) Daan Leijen 2002
-- (c) Andriy Palamarchuk 2008
-- License : BSD-style
-- (32 or 64).
-----------------------------------------------------------------------------
-- (32 or 64).
-----------------------------------------------------------------------------
-module System.Event.IntMap
{-# LANGUAGE ExistentialQuantification, NoImplicitPrelude #-}
{-# LANGUAGE ExistentialQuantification, NoImplicitPrelude #-}
-module System.Event.Internal
+module GHC.Event.Internal
(
-- * Event back end
Backend
(
-- * Event back end
Backend
-module System.Event.KQueue
(
new
, available
) where
(
new
, available
) where
-import qualified System.Event.Internal as E
+import qualified GHC.Event.Internal as E
#include "EventConfig.h"
#if !defined(HAVE_KQUEUE)
#include "EventConfig.h"
#if !defined(HAVE_KQUEUE)
import GHC.Num (Num(..))
import GHC.Real (ceiling, floor, fromIntegral)
import GHC.Show (Show(show))
import GHC.Num (Num(..))
import GHC.Real (ceiling, floor, fromIntegral)
import GHC.Show (Show(show))
-import System.Event.Internal (Timeout(..))
+import GHC.Event.Internal (Timeout(..))
import System.Posix.Internals (c_close)
import System.Posix.Types (Fd(..))
import System.Posix.Internals (c_close)
import System.Posix.Types (Fd(..))
-import qualified System.Event.Array as A
+import qualified GHC.Event.Array as A
#if defined(HAVE_KEVENT64)
import Data.Int (Int64)
#if defined(HAVE_KEVENT64)
import Data.Int (Int64)
-module System.Event.Manager
+module GHC.Event.Manager
( -- * Types
EventManager
( -- * Types
EventManager
import GHC.Num (Num(..))
import GHC.Real ((/), fromIntegral )
import GHC.Show (Show(..))
import GHC.Num (Num(..))
import GHC.Real ((/), fromIntegral )
import GHC.Show (Show(..))
-import System.Event.Clock (getCurrentTime)
-import System.Event.Control
-import System.Event.Internal (Backend, Event, evtClose, evtRead, evtWrite,
- Timeout(..))
-import System.Event.Unique (Unique, UniqueSource, newSource, newUnique)
+import GHC.Event.Clock (getCurrentTime)
+import GHC.Event.Control
+import GHC.Event.Internal (Backend, Event, evtClose, evtRead, evtWrite,
+ Timeout(..))
+import GHC.Event.Unique (Unique, UniqueSource, newSource, newUnique)
import System.Posix.Types (Fd)
import System.Posix.Types (Fd)
-import qualified System.Event.IntMap as IM
-import qualified System.Event.Internal as I
-import qualified System.Event.PSQ as Q
+import qualified GHC.Event.IntMap as IM
+import qualified GHC.Event.Internal as I
+import qualified GHC.Event.PSQ as Q
-import qualified System.Event.KQueue as KQueue
+import qualified GHC.Event.KQueue as KQueue
#elif defined(HAVE_EPOLL)
#elif defined(HAVE_EPOLL)
-import qualified System.Event.EPoll as EPoll
+import qualified GHC.Event.EPoll as EPoll
-import qualified System.Event.Poll as Poll
+import qualified GHC.Event.Poll as Poll
#else
# error not implemented for this operating system
#endif
#else
# error not implemented for this operating system
#endif
Created -> go Q.empty `finally` cleanup mgr
Dying -> cleanup mgr
_ -> do cleanup mgr
Created -> go Q.empty `finally` cleanup mgr
Dying -> cleanup mgr
_ -> do cleanup mgr
- error $ "System.Event.Manager.loop: state is already " ++
+ error $ "GHC.Event.Manager.loop: state is already " ++
show state
where
go q = do (running, q') <- step mgr q
show state
where
go q = do (running, q') <- step mgr q
-- Queues/, ICFP 2001, pp. 110-121
--
-- <http://citeseer.ist.psu.edu/hinze01simple.html>
-- Queues/, ICFP 2001, pp. 110-121
--
-- <http://citeseer.ist.psu.edu/hinze01simple.html>
(
-- * Binding Type
Elem(..)
(
-- * Binding Type
Elem(..)
import GHC.Base
import GHC.Num (Num(..))
import GHC.Show (Show(showsPrec))
import GHC.Base
import GHC.Num (Num(..))
import GHC.Show (Show(showsPrec))
-import System.Event.Unique (Unique)
+import GHC.Event.Unique (Unique)
-- | @E k p@ binds the key @k@ with the priority @p@.
data Elem a = E
-- | @E k p@ binds the key @k@ with the priority @p@.
data Elem a = E
-- Utility functions
moduleError :: String -> String -> a
-- Utility functions
moduleError :: String -> String -> a
-moduleError fun msg = error ("System.Event.PSQ." ++ fun ++ ':' : ' ' : msg)
+moduleError fun msg = error ("GHC.Event.PSQ." ++ fun ++ ':' : ' ' : msg)
{-# NOINLINE moduleError #-}
------------------------------------------------------------------------
{-# NOINLINE moduleError #-}
------------------------------------------------------------------------
-module System.Event.Poll
import GHC.Show (Show)
import System.Posix.Types (Fd(..))
import GHC.Show (Show)
import System.Posix.Types (Fd(..))
-import qualified System.Event.Array as A
-import qualified System.Event.Internal as E
+import qualified GHC.Event.Array as A
+import qualified GHC.Event.Internal as E
available :: Bool
available = True
available :: Bool
available = True
{-# LANGUAGE BangPatterns, ForeignFunctionInterface, NoImplicitPrelude #-}
{-# LANGUAGE BangPatterns, ForeignFunctionInterface, NoImplicitPrelude #-}
-module System.Event.Thread
(
ensureIOManagerIsRunning
, threadWaitRead
(
ensureIOManagerIsRunning
, threadWaitRead
import GHC.IO (mask_, onException)
import GHC.IO.Exception (ioError)
import GHC.MVar (MVar, newEmptyMVar, newMVar, putMVar, takeMVar)
import GHC.IO (mask_, onException)
import GHC.IO.Exception (ioError)
import GHC.MVar (MVar, newEmptyMVar, newMVar, putMVar, takeMVar)
-import System.Event.Internal (eventIs, evtClose)
-import System.Event.Manager (Event, EventManager, evtRead, evtWrite, loop,
+import GHC.Event.Internal (eventIs, evtClose)
+import GHC.Event.Manager (Event, EventManager, evtRead, evtWrite, loop,
new, registerFd, unregisterFd_, registerTimeout)
new, registerFd, unregisterFd_, registerTimeout)
-import qualified System.Event.Manager as M
+import qualified GHC.Event.Manager as M
import System.IO.Unsafe (unsafePerformIO)
import System.Posix.Types (Fd)
import System.IO.Unsafe (unsafePerformIO)
import System.Posix.Types (Fd)
{-# LANGUAGE BangPatterns, GeneralizedNewtypeDeriving, NoImplicitPrelude #-}
{-# LANGUAGE BangPatterns, GeneralizedNewtypeDeriving, NoImplicitPrelude #-}
-module System.Event.Unique
(
UniqueSource
, Unique(..)
(
UniqueSource
, Unique(..)
}
if !os(windows) {
exposed-modules:
}
if !os(windows) {
exposed-modules:
- System.Event.Array
- System.Event.Clock
- System.Event.Control
- System.Event.EPoll
- System.Event.IntMap
- System.Event.Internal
- System.Event.KQueue
- System.Event.Manager
- System.Event.PSQ
- System.Event.Poll
- System.Event.Thread
- System.Event.Unique
+ GHC.Event.Array
+ GHC.Event.Clock
+ GHC.Event.Control
+ GHC.Event.EPoll
+ GHC.Event.IntMap
+ GHC.Event.Internal
+ GHC.Event.KQueue
+ GHC.Event.Manager
+ GHC.Event.PSQ
+ GHC.Event.Poll
+ GHC.Event.Thread
+ GHC.Event.Unique
}
-- We need to set the package name to base (without a version number)
-- as it's magic.
}
-- We need to set the package name to base (without a version number)
-- as it's magic.