addMatch :: Connection
         -> Bool -- ^Whether to block waiting for a response, allowing
                 -- us to raise an exception if a response never comes.
         -> String -> IO ()
addMatch conn block rule =
  withForeignPtr conn $ \conn ->
    withCString rule $ \rule -> do
      if block
        then withErrorP $ bus_add_match conn rule
        else bus_add_match conn rule nullPtr

-- vim: set ts=2 sw=2 tw=72 et ft=haskell :
addMatch :: Connection
         -> Bool -- ^Whether to block waiting for a response, allowing
                 -- us to raise an exception if a response never comes.
         -> String -> IO ()
addMatch conn block rule =
  withForeignPtr conn $ \conn ->
    withCString rule $ \rule -> do
      if block
        then withErrorP $ bus_add_match conn rule
        else bus_add_match conn rule nullPtr

-- vim: set ts=2 sw=2 tw=72 et ft=haskell :
addMatch conn block rule =
  withForeignPtr conn $ \conn ->
    withCString rule $ \rule -> do
      if block
        then withErrorP $ bus_add_match conn rule
        else bus_add_match conn rule nullPtr

-- vim: set ts=2 sw=2 tw=72 et ft=haskell :