llvm-hs-pure-6.2.0: Pure Haskell LLVM functionality (no FFI).

Safe HaskellNone
LanguageHaskell2010

LLVM.IRBuilder.Module

Synopsis

Documentation

newtype ModuleBuilderT m a Source #

Instances
MonadTrans ModuleBuilderT Source # 
Instance details

Defined in LLVM.IRBuilder.Module

Methods

lift :: Monad m => m a -> ModuleBuilderT m a #

MonadWriter w m => MonadWriter w (ModuleBuilderT m) Source # 
Instance details

Defined in LLVM.IRBuilder.Module

Methods

writer :: (a, w) -> ModuleBuilderT m a #

tell :: w -> ModuleBuilderT m () #

listen :: ModuleBuilderT m a -> ModuleBuilderT m (a, w) #

pass :: ModuleBuilderT m (a, w -> w) -> ModuleBuilderT m a #

MonadState s m => MonadState s (ModuleBuilderT m) Source # 
Instance details

Defined in LLVM.IRBuilder.Module

Methods

get :: ModuleBuilderT m s #

put :: s -> ModuleBuilderT m () #

state :: (s -> (a, s)) -> ModuleBuilderT m a #

MonadReader r m => MonadReader r (ModuleBuilderT m) Source # 
Instance details

Defined in LLVM.IRBuilder.Module

Methods

ask :: ModuleBuilderT m r #

local :: (r -> r) -> ModuleBuilderT m a -> ModuleBuilderT m a #

reader :: (r -> a) -> ModuleBuilderT m a #

MonadError e m => MonadError e (ModuleBuilderT m) Source # 
Instance details

Defined in LLVM.IRBuilder.Module

Methods

throwError :: e -> ModuleBuilderT m a #

catchError :: ModuleBuilderT m a -> (e -> ModuleBuilderT m a) -> ModuleBuilderT m a #

Monad m => Monad (ModuleBuilderT m) Source # 
Instance details

Defined in LLVM.IRBuilder.Module

Functor m => Functor (ModuleBuilderT m) Source # 
Instance details

Defined in LLVM.IRBuilder.Module

Methods

fmap :: (a -> b) -> ModuleBuilderT m a -> ModuleBuilderT m b #

(<$) :: a -> ModuleBuilderT m b -> ModuleBuilderT m a #

MonadFix m => MonadFix (ModuleBuilderT m) Source # 
Instance details

Defined in LLVM.IRBuilder.Module

Methods

mfix :: (a -> ModuleBuilderT m a) -> ModuleBuilderT m a #

MonadFail m => MonadFail (ModuleBuilderT m) Source # 
Instance details

Defined in LLVM.IRBuilder.Module

Methods

fail :: String -> ModuleBuilderT m a #

Monad m => Applicative (ModuleBuilderT m) Source # 
Instance details

Defined in LLVM.IRBuilder.Module

Methods

pure :: a -> ModuleBuilderT m a #

(<*>) :: ModuleBuilderT m (a -> b) -> ModuleBuilderT m a -> ModuleBuilderT m b #

liftA2 :: (a -> b -> c) -> ModuleBuilderT m a -> ModuleBuilderT m b -> ModuleBuilderT m c #

(*>) :: ModuleBuilderT m a -> ModuleBuilderT m b -> ModuleBuilderT m b #

(<*) :: ModuleBuilderT m a -> ModuleBuilderT m b -> ModuleBuilderT m a #

MonadPlus m => Alternative (ModuleBuilderT m) Source # 
Instance details

Defined in LLVM.IRBuilder.Module

MonadPlus m => MonadPlus (ModuleBuilderT m) Source # 
Instance details

Defined in LLVM.IRBuilder.Module

MonadIO m => MonadIO (ModuleBuilderT m) Source # 
Instance details

Defined in LLVM.IRBuilder.Module

Methods

liftIO :: IO a -> ModuleBuilderT m a #

MonadCont m => MonadCont (ModuleBuilderT m) Source # 
Instance details

Defined in LLVM.IRBuilder.Module

Methods

callCC :: ((a -> ModuleBuilderT m b) -> ModuleBuilderT m a) -> ModuleBuilderT m a #

Monad m => MonadModuleBuilder (ModuleBuilderT m) Source # 
Instance details

Defined in LLVM.IRBuilder.Module

class Monad m => MonadModuleBuilder m where Source #

Instances
MonadModuleBuilder m => MonadModuleBuilder (ListT m) Source # 
Instance details

Defined in LLVM.IRBuilder.Module

MonadModuleBuilder m => MonadModuleBuilder (MaybeT m) Source # 
Instance details

Defined in LLVM.IRBuilder.Module

Monad m => MonadModuleBuilder (ModuleBuilderT m) Source # 
Instance details

Defined in LLVM.IRBuilder.Module

MonadModuleBuilder m => MonadModuleBuilder (IdentityT m) Source # 
Instance details

Defined in LLVM.IRBuilder.Module

MonadModuleBuilder m => MonadModuleBuilder (ExceptT e m) Source # 
Instance details

Defined in LLVM.IRBuilder.Module

MonadModuleBuilder m => MonadModuleBuilder (StateT s m) Source # 
Instance details

Defined in LLVM.IRBuilder.Module

MonadModuleBuilder m => MonadModuleBuilder (StateT s m) Source # 
Instance details

Defined in LLVM.IRBuilder.Module

(Monoid w, MonadModuleBuilder m) => MonadModuleBuilder (WriterT w m) Source # 
Instance details

Defined in LLVM.IRBuilder.Module

(Monoid w, MonadModuleBuilder m) => MonadModuleBuilder (WriterT w m) Source # 
Instance details

Defined in LLVM.IRBuilder.Module

MonadModuleBuilder m => MonadModuleBuilder (ContT r m) Source # 
Instance details

Defined in LLVM.IRBuilder.Module

MonadModuleBuilder m => MonadModuleBuilder (ReaderT r m) Source # 
Instance details

Defined in LLVM.IRBuilder.Module

(MonadModuleBuilder m, Monoid w) => MonadModuleBuilder (RWST r w s m) Source # 
Instance details

Defined in LLVM.IRBuilder.Module

(MonadModuleBuilder m, Monoid w) => MonadModuleBuilder (RWST r w s m) Source # 
Instance details

Defined in LLVM.IRBuilder.Module

runModuleBuilder :: ModuleBuilderState -> ModuleBuilder a -> (a, [Definition]) Source #

Evaluate ModuleBuilder to a result and a list of definitions

runModuleBuilderT :: Monad m => ModuleBuilderState -> ModuleBuilderT m a -> m (a, [Definition]) Source #

Evaluate ModuleBuilderT to a result and a list of definitions

execModuleBuilder :: ModuleBuilderState -> ModuleBuilder a -> [Definition] Source #

Evaluate ModuleBuilder to a list of definitions

execModuleBuilderT :: Monad m => ModuleBuilderState -> ModuleBuilderT m a -> m [Definition] Source #

Evaluate ModuleBuilderT to a list of definitions

data ParameterName Source #

A parameter name suggestion

Instances
Eq ParameterName Source # 
Instance details

Defined in LLVM.IRBuilder.Module

Data ParameterName Source # 
Instance details

Defined in LLVM.IRBuilder.Module

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ParameterName -> c ParameterName #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ParameterName #

toConstr :: ParameterName -> Constr #

dataTypeOf :: ParameterName -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ParameterName) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ParameterName) #

gmapT :: (forall b. Data b => b -> b) -> ParameterName -> ParameterName #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ParameterName -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ParameterName -> r #

gmapQ :: (forall d. Data d => d -> u) -> ParameterName -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ParameterName -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ParameterName -> m ParameterName #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ParameterName -> m ParameterName #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ParameterName -> m ParameterName #

Ord ParameterName Source # 
Instance details

Defined in LLVM.IRBuilder.Module

Read ParameterName Source # 
Instance details

Defined in LLVM.IRBuilder.Module

Show ParameterName Source # 
Instance details

Defined in LLVM.IRBuilder.Module

IsString ParameterName Source #

Using fromString on non-ASCII strings will throw an error.

Instance details

Defined in LLVM.IRBuilder.Module

Generic ParameterName Source # 
Instance details

Defined in LLVM.IRBuilder.Module

Associated Types

type Rep ParameterName :: * -> * #

type Rep ParameterName Source # 
Instance details

Defined in LLVM.IRBuilder.Module

type Rep ParameterName = D1 (MetaData "ParameterName" "LLVM.IRBuilder.Module" "llvm-hs-pure-6.2.0-EYOLM0hMFOhEED6ANzgqvG" False) (C1 (MetaCons "NoParameterName" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "ParameterName" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ShortByteString)))

function Source #

Arguments

:: MonadModuleBuilder m 
=> Name

Function name

-> [(Type, ParameterName)]

Parameter types and name suggestions

-> Type

Return type

-> ([Operand] -> IRBuilderT m ())

Function body builder

-> m Operand 

Define and emit a (non-variadic) function definition

extern Source #

Arguments

:: MonadModuleBuilder m 
=> Name

Definition name

-> [Type]

Parameter types

-> Type

Type

-> m Operand 

An external function definition

typedef :: MonadModuleBuilder m => Name -> Maybe Type -> m () Source #

A named type definition

buildModule :: ShortByteString -> ModuleBuilder a -> Module Source #

Convenience function for module construction

buildModuleT :: Monad m => ShortByteString -> ModuleBuilderT m a -> m Module Source #

Convenience function for module construction (transformer version)