Permalink
Browse files

Fix compilation errors on OS X

  • Loading branch information...
1 parent 469df3d commit 6f56242e2acb4b604c1c600b0bdf6a41d3e4513c @tibbe committed May 31, 2010
Showing with 6 additions and 3 deletions.
  1. +2 −0 src/System/Event/EPoll.hsc
  2. +4 −3 src/System/Event/KQueue.hsc
@@ -19,6 +19,8 @@ import qualified System.Event.Internal as E
#include "EventConfig.h"
#if !defined(HAVE_EPOLL)
+import Prelude
+
new :: IO E.Backend
new = error "EPoll back end not implemented for this platform"
@@ -7,12 +7,12 @@ module System.Event.KQueue
, available
) where
-import Prelude
-import System.Posix.Internals (c_close)
import qualified System.Event.Internal as E
#include "EventConfig.h"
#if !defined(HAVE_KQUEUE)
+import Prelude
+
new :: IO E.Backend
new = error "KQueue back end not implemented for this platform"
@@ -32,6 +32,7 @@ import Foreign.Ptr (Ptr, nullPtr)
import Foreign.Storable (Storable(..))
import Prelude hiding (filter)
import System.Event.Internal (Timeout(..))
+import System.Posix.Internals (c_close)
import System.Posix.Types (Fd(..))
import qualified System.Event.Array as A
@@ -285,7 +286,7 @@ toEvent :: Filter -> E.Event
toEvent (Filter f)
| f == (#const EVFILT_READ) = E.evtRead
| f == (#const EVFILT_WRITE) = E.evtWrite
- | otherwise = error $ "toEvent: unknonwn filter " ++ show f
+ | otherwise = error $ "toEvent: unknown filter " ++ show f
foreign import ccall unsafe "kqueue"
c_kqueue :: IO CInt

0 comments on commit 6f56242

Please sign in to comment.