getState :: MonadIO m =>  TorrentStatus -> m TorrentState
getState ho =
  liftIO . withPtr ho $ \hoPtr ->
  toEnum . fromIntegral <$> [CU.exp| int { $(torrent_status * hoPtr)->state } |]
getState :: MonadIO m =>  TorrentStatus -> m TorrentState
getState ho =
  liftIO . withPtr ho $ \hoPtr ->
  toEnum . fromIntegral <$> [CU.exp| int { $(torrent_status * hoPtr)->state } |]
getState ho =
  liftIO . withPtr ho $ \hoPtr ->
  toEnum . fromIntegral <$> [CU.exp| int { $(torrent_status * hoPtr)->state } |]