hookDel :: Engine       -- ^ 'Unicorn' engine handle
        -> Hook         -- ^ 'Hook' handle
        -> Emulator ()  -- ^ 'ErrOk' on success, or other value on failure
hookDel uc hook = do
    err <- lift $ ucHookDel uc hook
    if err == ErrOk then
        right ()
    else
        left err

-------------------------------------------------------------------------------
-- Helper functions
-------------------------------------------------------------------------------

-- Takes the tuple returned by `ucHookAdd`, an IO (Error, Hook), and
-- returns either a `Right Hook` if no error occurred or a `Left Error` if an
-- error occurred
hookDel :: Engine       -- ^ 'Unicorn' engine handle
        -> Hook         -- ^ 'Hook' handle
        -> Emulator ()
hookDel uc hook = do
    err <- lift $ ucHookDel uc hook
    if err == ErrOk then
        right ()
    else
        left err

-------------------------------------------------------------------------------
-- Helper functions
-------------------------------------------------------------------------------

-- Takes the tuple returned by `ucHookAdd`, an IO (Error, Hook), and
-- returns either a `Right Hook` if no error occurred or a `Left Error` if an
-- error occurred
hookDel uc hook = do
    err <- lift $ ucHookDel uc hook
    if err == ErrOk then
        right ()
    else
        left err

-------------------------------------------------------------------------------
-- Helper functions
-------------------------------------------------------------------------------

-- Takes the tuple returned by `ucHookAdd`, an IO (Error, Hook), and
-- returns either a `Right Hook` if no error occurred or a `Left Error` if an
-- error occurred