heystone-0.1.0: Haskell bindings for the Keystone assembler framework
Copyright(c) Adrian Herrera 2016
LicenseGPL-2
Safe HaskellSafe-Inferred
LanguageHaskell2010

Heystone.Internal.Core

Description

Defines core Keystone components.

This module should not be directly imported; it is only exposed because of the way cabal handles ordering of chs files.

Synopsis

Documentation

newtype Engine Source #

The Keystone engine.

Constructors

Engine (ForeignPtr Engine) 

withEngine :: Engine -> (Ptr Engine -> IO b) -> IO b Source #

type EnginePtr = Ptr Engine Source #

A pointer to the Keystone engine.

mkEngine :: EnginePtr -> IO Engine Source #

Make a new Keystone engine out of an engine pointer. The returned Keystone engine will automatically call ks_close_wrapper when it goes out of scope.

data Error Source #

Errors encountered by the Keystone API. These values are returned by errno.

Instances

Instances details
Bounded Error Source # 
Instance details

Defined in Heystone.Internal.Core

Enum Error Source # 
Instance details

Defined in Heystone.Internal.Core

Show Error Source # 
Instance details

Defined in Heystone.Internal.Core

Methods

showsPrec :: Int -> Error -> ShowS #

show :: Error -> String #

showList :: [Error] -> ShowS #

Eq Error Source # 
Instance details

Defined in Heystone.Internal.Core

Methods

(==) :: Error -> Error -> Bool #

(/=) :: Error -> Error -> Bool #

type Assembler a = ExceptT Error IO a Source #

The assembler runs in the IO monad and allows for the handling of errors "under the hood".