Rename System.Event to GHC.Event
authorIan Lynagh <igloo@earth.li>
Mon, 21 Mar 2011 23:43:46 +0000 (23:43 +0000)
committerIan Lynagh <igloo@earth.li>
Mon, 21 Mar 2011 23:43:46 +0000 (23:43 +0000)
It's just an internal GHC library, for now at least

15 files changed:
GHC/Conc/IO.hs
GHC/Event.hs [moved from System/Event.hs with 93% similarity]
GHC/Event/Array.hs [moved from System/Event/Array.hs with 98% similarity]
GHC/Event/Clock.hsc [moved from System/Event/Clock.hsc with 96% similarity]
GHC/Event/Control.hs [moved from System/Event/Control.hs with 99% similarity]
GHC/Event/EPoll.hsc [moved from System/Event/EPoll.hsc with 97% similarity]
GHC/Event/IntMap.hs [moved from System/Event/IntMap.hs with 99% similarity]
GHC/Event/Internal.hs [moved from System/Event/Internal.hs with 99% similarity]
GHC/Event/KQueue.hsc [moved from System/Event/KQueue.hsc with 98% similarity]
GHC/Event/Manager.hs [moved from System/Event/Manager.hs with 95% similarity]
GHC/Event/PSQ.hs [moved from System/Event/PSQ.hs with 99% similarity]
GHC/Event/Poll.hsc [moved from System/Event/Poll.hsc with 97% similarity]
GHC/Event/Thread.hs [moved from System/Event/Thread.hs with 96% similarity]
GHC/Event/Unique.hs [moved from System/Event/Unique.hs with 97% similarity]
base.cabal

index fc80026..83a8a1c 100644 (file)
@@ -65,7 +65,7 @@ import GHC.Conc.Windows (asyncRead, asyncWrite, asyncDoProc, asyncReadBA,
                          asyncWriteBA, ConsoleEvent(..), win32ConsoleHandler,
                          toWin32ConsoleEvent)
 #else
-import qualified System.Event.Thread as Event
+import qualified GHC.Event.Thread as Event
 #endif
 
 ensureIOManagerIsRunning :: IO ()
similarity index 93%
rename from System/Event.hs
rename to GHC/Event.hs
index 9fd836d..6bb975e 100644 (file)
@@ -2,7 +2,7 @@
 -- descriptors and timeouts.
 --
 -- This module should be considered GHC internal.
-module System.Event
+module GHC.Event
     ( -- * Types
       EventManager
 
@@ -36,4 +36,4 @@ module System.Event
     , unregisterTimeout
     ) where
 
-import System.Event.Manager
+import GHC.Event.Manager
similarity index 98%
rename from System/Event/Array.hs
rename to GHC/Event/Array.hs
index ff4b32c..464bbf4 100644 (file)
@@ -1,6 +1,6 @@
 {-# LANGUAGE BangPatterns, CPP, ForeignFunctionInterface, NoImplicitPrelude #-}
 
-module System.Event.Array
+module GHC.Event.Array
     (
       Array
     , capacity
@@ -46,7 +46,7 @@ import GHC.Show (show)
 -- 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
similarity index 96%
rename from System/Event/Clock.hsc
rename to GHC/Event/Clock.hsc
index ae31a7b..98758a3 100644 (file)
@@ -1,6 +1,6 @@
 {-# LANGUAGE NoImplicitPrelude, BangPatterns, ForeignFunctionInterface #-}
 
-module System.Event.Clock (getCurrentTime) where
+module GHC.Event.Clock (getCurrentTime) where
 
 #include <sys/time.h>
 
similarity index 99%
rename from System/Event/Control.hs
rename to GHC/Event/Control.hs
index 635d864..bd58ae2 100644 (file)
@@ -5,7 +5,7 @@
            , BangPatterns
   #-}
 
-module System.Event.Control
+module GHC.Event.Control
     (
     -- * Managing the IO manager
       Signal
similarity index 97%
rename from System/Event/EPoll.hsc
rename to GHC/Event/EPoll.hsc
index f30c4bd..1cfd202 100644 (file)
 --
 -- epoll decouples monitor an fd from the process of registering it.
 --
-module System.Event.EPoll
+module GHC.Event.EPoll
     (
       new
     , available
     ) where
 
-import qualified System.Event.Internal as E
+import qualified GHC.Event.Internal as E
 
 #include "EventConfig.h"
 #if !defined(HAVE_EPOLL)
@@ -54,8 +54,8 @@ import System.Posix.Internals (c_close)
 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
similarity index 99%
rename from System/Event/IntMap.hs
rename to GHC/Event/IntMap.hs
index 61ae002..e324026 100644 (file)
@@ -2,7 +2,7 @@
 
 -----------------------------------------------------------------------------
 -- |
--- Module      :  System.Event.IntMap
+-- Module      :  GHC.Event.IntMap
 -- Copyright   :  (c) Daan Leijen 2002
 --                (c) Andriy Palamarchuk 2008
 -- License     :  BSD-style
@@ -40,7 +40,7 @@
 -- (32 or 64).
 -----------------------------------------------------------------------------
 
-module System.Event.IntMap
+module GHC.Event.IntMap
     (
     -- * Map type
     IntMap
similarity index 99%
rename from System/Event/Internal.hs
rename to GHC/Event/Internal.hs
index 545ff6f..b5d7c0f 100644 (file)
@@ -1,6 +1,6 @@
 {-# LANGUAGE ExistentialQuantification, NoImplicitPrelude #-}
 
-module System.Event.Internal
+module GHC.Event.Internal
     (
     -- * Event back end
       Backend
similarity index 98%
rename from System/Event/KQueue.hsc
rename to GHC/Event/KQueue.hsc
index 4a86435..19c7adf 100644 (file)
@@ -6,13 +6,13 @@
            , BangPatterns
   #-}
 
-module System.Event.KQueue
+module GHC.Event.KQueue
     (
       new
     , available
     ) where
 
-import qualified System.Event.Internal as E
+import qualified GHC.Event.Internal as E
 
 #include "EventConfig.h"
 #if !defined(HAVE_KQUEUE)
@@ -41,10 +41,10 @@ import GHC.Err (undefined)
 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 qualified System.Event.Array as A
+import qualified GHC.Event.Array as A
 
 #if defined(HAVE_KEVENT64)
 import Data.Int (Int64)
similarity index 95%
rename from System/Event/Manager.hs
rename to GHC/Event/Manager.hs
index 9766774..bb7379c 100644 (file)
@@ -7,7 +7,7 @@
            , FlexibleInstances
   #-}
 
-module System.Event.Manager
+module GHC.Event.Manager
     ( -- * Types
       EventManager
 
@@ -62,23 +62,23 @@ import GHC.List (filter)
 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 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
 
 #if defined(HAVE_KQUEUE)
-import qualified System.Event.KQueue as KQueue
+import qualified GHC.Event.KQueue as KQueue
 #elif defined(HAVE_EPOLL)
-import qualified System.Event.EPoll  as EPoll
+import qualified GHC.Event.EPoll  as EPoll
 #elif defined(HAVE_POLL)
-import qualified System.Event.Poll   as Poll
+import qualified GHC.Event.Poll   as Poll
 #else
 # error not implemented for this operating system
 #endif
@@ -240,7 +240,7 @@ loop mgr@EventManager{..} = do
     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
similarity index 99%
rename from System/Event/PSQ.hs
rename to GHC/Event/PSQ.hs
index f86be5b..8c285bf 100644 (file)
@@ -48,7 +48,7 @@
 -- Queues/, ICFP 2001, pp. 110-121
 --
 -- <http://citeseer.ist.psu.edu/hinze01simple.html>
-module System.Event.PSQ
+module GHC.Event.PSQ
     (
     -- * Binding Type
     Elem(..)
@@ -91,7 +91,7 @@ import Data.Maybe (Maybe(..))
 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
@@ -458,7 +458,7 @@ tourView (Winner e (LLoser _ e' tl m tr) m') =
 -- 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 #-}
 
 ------------------------------------------------------------------------
similarity index 97%
rename from System/Event/Poll.hsc
rename to GHC/Event/Poll.hsc
index 323ab9c..82acc62 100644 (file)
@@ -5,7 +5,7 @@
            , BangPatterns
   #-}
 
-module System.Event.Poll
+module GHC.Event.Poll
     (
       new
     , available
@@ -41,8 +41,8 @@ import GHC.Real (ceiling, fromIntegral)
 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
similarity index 96%
rename from System/Event/Thread.hs
rename to GHC/Event/Thread.hs
index 9c58a5a..dbfb14f 100644 (file)
@@ -1,6 +1,6 @@
 {-# LANGUAGE BangPatterns, ForeignFunctionInterface, NoImplicitPrelude #-}
 
-module System.Event.Thread
+module GHC.Event.Thread
     (
       ensureIOManagerIsRunning
     , threadWaitRead
@@ -21,10 +21,10 @@ import GHC.Conc.Sync (TVar, ThreadId, ThreadStatus(..), atomically, forkIO,
 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)
-import qualified System.Event.Manager as M
+import qualified GHC.Event.Manager as M
 import System.IO.Unsafe (unsafePerformIO)
 import System.Posix.Types (Fd)
 
similarity index 97%
rename from System/Event/Unique.hs
rename to GHC/Event/Unique.hs
index 879232c..66b799c 100644 (file)
@@ -1,5 +1,5 @@
 {-# LANGUAGE BangPatterns, GeneralizedNewtypeDeriving, NoImplicitPrelude #-}
-module System.Event.Unique
+module GHC.Event.Unique
     (
       UniqueSource
     , Unique(..)
index d863d7a..6700537 100644 (file)
@@ -207,20 +207,20 @@ Library {
     }
     if !os(windows) {
         exposed-modules:
-            System.Event
+            GHC.Event
         other-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.