diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -5,6 +5,8 @@
 
 This software currently has *beta* status, i.e. it had seen limited testing.
 
+Version 0.8.4 - Various fixes to work with GHC 7.4.1.
+
 Version 0.8.3 - Derive Read in SocketOption and PollEvent.
 
 Version 0.8.2 - Revert changes to support 0MQ 2.x as well as 3.x in a single
diff --git a/src/System/ZMQ.hs b/src/System/ZMQ.hs
--- a/src/System/ZMQ.hs
+++ b/src/System/ZMQ.hs
@@ -33,6 +33,8 @@
   , Rep(..)
   , XReq(..)
   , XRep(..)
+  , Dealer(..)
+  , Router(..)
   , Pull(..)
   , Push(..)
   , Up(..)
@@ -75,7 +77,6 @@
 import Foreign.C.Types (CInt, CShort)
 import qualified Data.ByteString as SB
 import qualified Data.ByteString.Lazy as LB
-import System.Mem.Weak (addFinalizer)
 import System.Posix.Types (Fd(..))
 import System.ZMQ.Base
 import qualified System.ZMQ.Base as B
@@ -135,6 +136,10 @@
 instance SType XReq where
     zmqSocketType = const xrequest
 
+data Dealer = Dealer
+instance SType Dealer where
+    zmqSocketType = const dealer
+
 -- | Special socket type to be used in request/reply middleboxes
 -- such as zmq_queue(7).  Requests received using this socket are already
 -- properly tagged with prefix identifying the original requester. When
@@ -145,6 +150,10 @@
 instance SType XRep where
     zmqSocketType = const xresponse
 
+data Router = Router
+instance SType Router where
+    zmqSocketType = const router
+
 -- | A socket of type Pull is used by a pipeline node to receive
 -- messages from upstream pipeline nodes. Messages are fair-queued from
 -- among all connected upstream nodes. The zmq_send() function is not
@@ -315,13 +324,8 @@
 -- automatic socket closing and may be safer to use.
 socket :: SType a => Context -> a -> IO (Socket a)
 socket (Context c) t = do
-  let zt = typeVal . zmqSocketType $ t
-  s <- throwErrnoIfNull "socket" (c_zmq_socket c zt)
-  sock@(Socket _ status) <- mkSocket s
-  addFinalizer sock $ do
-    alive <- atomicModifyIORef status (\b -> (False, b))
-    when alive $ c_zmq_close s >> return () -- socket has not been closed yet
-  return sock
+    let zt = typeVal . zmqSocketType $ t
+    throwErrnoIfNull "socket" (c_zmq_socket c zt) >>= mkSocket
 
 -- | Close a 0MQ socket. 'withSocket' provides automatic socket closing and may
 -- be safer to use.
diff --git a/src/System/ZMQ/Base.hsc b/src/System/ZMQ/Base.hsc
--- a/src/System/ZMQ/Base.hsc
+++ b/src/System/ZMQ/Base.hsc
@@ -70,6 +70,8 @@
   , response   = ZMQ_REP
   , xrequest   = ZMQ_XREQ
   , xresponse  = ZMQ_XREP
+  , dealer     = ZMQ_DEALER
+  , router     = ZMQ_ROUTER
   , pull       = ZMQ_PULL
   , push       = ZMQ_PUSH
   , upstream   = ZMQ_UPSTREAM
diff --git a/src/System/ZMQ/Internal.hs b/src/System/ZMQ/Internal.hs
--- a/src/System/ZMQ/Internal.hs
+++ b/src/System/ZMQ/Internal.hs
@@ -24,7 +24,7 @@
     ) where
 
 import Control.Applicative
-import Control.Monad (foldM_)
+import Control.Monad (foldM_, when)
 import Control.Exception
 import Data.IORef (IORef)
 
@@ -36,7 +36,7 @@
 import qualified Data.ByteString as SB
 import qualified Data.ByteString.Lazy as LB
 import qualified Data.ByteString.Unsafe as UB
-import Data.IORef (newIORef)
+import Data.IORef (newIORef, mkWeakIORef, readIORef)
 
 import System.ZMQ.Base
 
@@ -71,7 +71,14 @@
 {-# INLINE onSocket #-}
 
 mkSocket :: ZMQSocket -> IO (Socket a)
-mkSocket s = Socket s <$> newIORef True
+mkSocket s = do
+    ref <- newIORef True
+    addFinalizer ref $ do
+        alive <- readIORef ref
+        when alive $ c_zmq_close s >> return ()
+    return (Socket s ref)
+  where
+    addFinalizer r f = mkWeakIORef r f >> return ()
 
 messageOf :: SB.ByteString -> IO Message
 messageOf b = UB.unsafeUseAsCStringLen b $ \(cstr, len) -> do
diff --git a/zeromq-haskell.cabal b/zeromq-haskell.cabal
--- a/zeromq-haskell.cabal
+++ b/zeromq-haskell.cabal
@@ -1,5 +1,5 @@
 name:               zeromq-haskell
-version:            0.8.3
+version:            0.8.4
 synopsis:           Bindings to ZeroMQ 2.1.x
 category:           System, FFI
 license:            MIT
@@ -9,7 +9,7 @@
 copyright:          Copyright (c) 2011 zeromq-haskell authors
 homepage:           http://github.com/twittner/zeromq-haskell/
 stability:          experimental
-tested-With:        GHC == 7.0.3
+tested-With:        GHC == 7.4.1
 cabal-version:      >= 1.8
 build-type:         Simple
 extra-source-files: README.md
