-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Bindings to the LLVM compiler toolkit using type families.
--
-- High-level bindings to the LLVM compiler toolkit using type families.
--
-- A note on versioning: The versions of this package are loosely based
-- on the LLVM version. However, we depend on a relatively stable part of
-- LLVM and provide a relatively stable API for it. We conform to the
-- Package Versioning Policy PVP, i.e. we increase the version of this
-- package when its API changes, but not necessarily when we add support
-- for a new LLVM version. We support all those LLVM versions that are
-- supported by our llvm-ffi dependency.
--
-- This package is a descendant of the llvm package which used
-- functional dependencies. The original llvm package will no
-- longer work with current versions of LLVM nor GHC.
@package llvm-tf
@version 9.2
-- | The LLVM (Low Level Virtual Machine) is virtual machine at a machine
-- code level. It supports both stand alone code generation and JITing.
-- The Haskell llvm package is a (relatively) high level interface to the
-- LLVM. The high level interface makes it easy to construct LLVM code.
-- There is also an interface to the raw low level LLVM API as exposed by
-- the LLVM C interface.
--
-- LLVM code is organized into modules (type Module). Each module
-- contains a number of global variables and functions (type
-- Function). Each functions has a number of basic blocks (type
-- BasicBlock). Each basic block has a number instructions, where
-- each instruction produces a value (type Value).
--
-- Unlike assembly code for a real processor the assembly code for LLVM
-- is in SSA (Static Single Assignment) form. This means that each
-- instruction generates a new bound variable which may not be assigned
-- again. A consequence of this is that where control flow joins from
-- several execution paths there has to be a phi pseudo instruction if
-- you want different variables to be joined into one.
--
-- The definition of several of the LLVM entities (Module,
-- Function, and BasicBlock) follow the same pattern. First
-- the entity has to be created using newX (where X is
-- one of Module, Function, or BasicBlock),
-- then at some later point it has to given its definition using
-- defineX. The reason for splitting the creation and definition
-- is that you often need to be able to refer to an entity before giving
-- it's body, e.g., in two mutually recursive functions. The the
-- newX and defineX function can also be done at the
-- same time by using createX. Furthermore, an explicit name can
-- be given to an entity by the newNamedX function; the
-- newX function just generates a fresh name.
module LLVM.Core
-- | Initialize jitter to the native target. The operation is idempotent.
initializeNativeTarget :: IO ()
data Module
newModule :: IO Module
newNamedModule :: String -> IO Module
defineModule :: () => Module -> CodeGenModule a -> IO a
destroyModule :: Module -> IO ()
createModule :: () => CodeGenModule a -> IO a
getModule :: CodeGenModule Module
setTarget :: String -> CodeGenModule ()
hostTriple :: String
setDataLayout :: String -> CodeGenModule ()
data PassManager
createPassManager :: IO PassManager
createFunctionPassManager :: Module -> IO PassManager
writeBitcodeToFile :: String -> Module -> IO ()
readBitcodeFromFile :: String -> IO Module
getModuleValues :: Module -> IO [(String, ModuleValue)]
getFunctions :: Module -> IO [(String, Value)]
getGlobalVariables :: Module -> IO [(String, Value)]
data ModuleValue
castModuleValue :: IsType a => ModuleValue -> Maybe (Value a)
data Value a
data ConstValue a
valueOf :: IsConst a => a -> Value a
constOf :: IsConst a => a -> ConstValue a
value :: () => ConstValue a -> Value a
zero :: IsType a => ConstValue a
allOnes :: IsInteger a => ConstValue a
undef :: IsType a => ConstValue a
class IsConst a
class IsConstFields a
createString :: () => String -> TGlobal (Array n Word8)
createStringNul :: () => String -> TGlobal (Array n Word8)
withString :: () => String -> (forall n. Natural n => Global (Array n Word8) -> CodeGenModule a) -> CodeGenModule a
withStringNul :: () => String -> (forall n. Natural n => Global (Array n Word8) -> CodeGenModule a) -> CodeGenModule a
constVector :: (Positive n, ToUnary n ~ u, Length (FixedList u) ~ u) => FixedList u (ConstValue a) -> ConstValue (Vector n a)
constArray :: (IsSized a, Natural n) => [ConstValue a] -> ConstValue (Array n a)
constCyclicVector :: Positive n => T [] (ConstValue a) -> ConstValue (Vector n a)
constCyclicArray :: (IsSized a, Natural n) => T [] (ConstValue a) -> ConstValue (Vector n a)
constStruct :: IsConstStruct c => c -> ConstValue (Struct (ConstStructOf c))
constPackedStruct :: IsConstStruct c => c -> ConstValue (PackedStruct (ConstStructOf c))
toVector :: MkVector n => Tuple n a -> Vector n a
fromVector :: MkVector n => Vector n a -> Tuple n a
vector :: Positive n => FixedList (ToUnary n) a -> Vector n a
cyclicVector :: Positive n => T [] a -> Vector n a
consVector :: (ConsVector f, ResultSize f ~ n, NumberOfArguments f ~ u, u ~ ToUnary n, FromUnary u ~ n, Natural n) => f
data CodeGenFunction r a
data CodeGenModule a
type Function a = Value FunPtr a
newFunction :: IsFunction a => Linkage -> CodeGenModule (Function a)
newNamedFunction :: IsFunction a => Linkage -> String -> CodeGenModule (Function a)
defineFunction :: FunctionArgs f => Function f -> FunctionCodeGen f -> CodeGenModule ()
createFunction :: FunctionArgs f => Linkage -> FunctionCodeGen f -> CodeGenModule (Function f)
createNamedFunction :: FunctionArgs f => Linkage -> String -> FunctionCodeGen f -> CodeGenModule (Function f)
setFuncCallConv :: () => Function a -> CallingConvention -> CodeGenModule ()
functionParameter :: Natural i => Function f -> Proxy i -> Value (FunctionParameter f i)
type TFunction a = CodeGenModule Function a
liftCodeGenModule :: () => CodeGenModule a -> CodeGenFunction r a
getParams :: Value -> IO [(String, Value)]
type Global a = Value Ptr a
newGlobal :: IsType a => Bool -> Linkage -> TGlobal a
newNamedGlobal :: IsType a => Bool -> Linkage -> String -> TGlobal a
defineGlobal :: () => Global a -> ConstValue a -> CodeGenModule ()
createGlobal :: IsType a => Bool -> Linkage -> ConstValue a -> TGlobal a
createNamedGlobal :: IsType a => Bool -> Linkage -> String -> ConstValue a -> TGlobal a
externFunction :: IsFunction a => String -> CodeGenFunction r (Function a)
staticFunction :: IsFunction f => FunPtr f -> CodeGenFunction r (Function f)
staticNamedFunction :: IsFunction f => String -> FunPtr f -> CodeGenFunction r (Function f)
externGlobal :: IsType a => Bool -> String -> CodeGenFunction r (Global a)
staticGlobal :: IsType a => Bool -> Ptr a -> CodeGenFunction r (Global a)
data GlobalMappings
getGlobalMappings :: CodeGenModule GlobalMappings
type TGlobal a = CodeGenModule Global a
-- | An enumeration for the kinds of linkage for global values.
data Linkage
-- | Externally visible function
ExternalLinkage :: Linkage
AvailableExternallyLinkage :: Linkage
-- | Keep one copy of function when linking (inline)
LinkOnceAnyLinkage :: Linkage
-- | Same, but only replaced by something equivalent.
LinkOnceODRLinkage :: Linkage
-- | Like LinkOnceODR, but possibly hidden.
LinkOnceODRAutoHideLinkage :: Linkage
-- | Keep one copy of named function when linking (weak)
WeakAnyLinkage :: Linkage
-- | Same, but only replaced by something equivalent.
WeakODRLinkage :: Linkage
-- | Special purpose, only applies to global arrays
AppendingLinkage :: Linkage
-- | Rename collisions when linking (static functions)
InternalLinkage :: Linkage
-- | Like Internal, but omit from symbol table
PrivateLinkage :: Linkage
-- | Function to be imported from DLL
DLLImportLinkage :: Linkage
-- | Function to be accessible from DLL
DLLExportLinkage :: Linkage
-- | ExternalWeak linkage description
ExternalWeakLinkage :: Linkage
-- | Stand-in functions for streaming fns from BC files
GhostLinkage :: Linkage
-- | Tentative definitions
CommonLinkage :: Linkage
-- | Like Private, but linker removes.
LinkerPrivateLinkage :: Linkage
-- | Like LinkerPrivate, but is weak.
LinkerPrivateWeakLinkage :: Linkage
data BasicBlock
newBasicBlock :: () => CodeGenFunction r BasicBlock
newNamedBasicBlock :: () => String -> CodeGenFunction r BasicBlock
defineBasicBlock :: () => BasicBlock -> CodeGenFunction r ()
createBasicBlock :: () => CodeGenFunction r BasicBlock
getCurrentBasicBlock :: () => CodeGenFunction r BasicBlock
getBasicBlocks :: Value -> IO [(String, BasicBlock)]
fromLabel :: Value Label -> BasicBlock
toLabel :: BasicBlock -> Value Label
getInstructions :: BasicBlock -> IO [(String, Value)]
getOperands :: Value -> IO [(String, Value)]
hasUsers :: Value -> IO Bool
getUsers :: [Use] -> IO [(String, Value)]
getUses :: Value -> IO [Use]
getUser :: Use -> IO Value
isChildOf :: BasicBlock -> Value -> IO Bool
getDep :: Use -> IO (String, String)
addAttributes :: () => Value a -> AttributeIndex -> [Attribute] -> CodeGenFunction r ()
data Attribute
newtype AttributeIndex
AttributeIndex :: Word32 -> AttributeIndex
attributeReturnIndex :: AttributeIndex
attributeFunctionIndex :: AttributeIndex
-- | Convert a varargs function to a regular function.
castVarArgs :: CastVarArgs a b => Function a -> Function b
-- | Print a value.
dumpValue :: Value a -> IO ()
-- | Print a type.
dumpType :: Value a -> IO ()
-- | Get the name of a Value.
getValueName :: Value a -> IO String
annotateValueList :: [Value] -> IO [(String, Value)]
module LLVM.Core.Attribute
zeroext :: Attribute
signext :: Attribute
inreg :: Attribute
byval :: Attribute
sret :: Attribute
align :: Word64 -> Attribute
noalias :: Attribute
nocapture :: Attribute
nest :: Attribute
returned :: Attribute
nonnull :: Attribute
dereferenceable :: Word64 -> Attribute
dereferenceableOrNull :: Word64 -> Attribute
swiftself :: Attribute
swifterror :: Attribute
immarg :: Attribute
alignstack :: Word64 -> Attribute
allocsize :: Attribute
alwaysinline :: Attribute
builtin :: Attribute
cold :: Attribute
convergent :: Attribute
inaccessiblememonly :: Attribute
inaccessiblememOrArgmemonly :: Attribute
inlinehint :: Attribute
jumptable :: Attribute
minsize :: Attribute
naked :: Attribute
noJumpTables :: Attribute
nobuiltin :: Attribute
noduplicate :: Attribute
nofree :: Attribute
noimplicitfloat :: Attribute
noinline :: Attribute
nonlazybind :: Attribute
noredzone :: Attribute
indirectTlsSegRefs :: Attribute
noreturn :: Attribute
norecurse :: Attribute
willreturn :: Attribute
nosync :: Attribute
nounwind :: Attribute
nullPointerIsValid :: Attribute
optforfuzzing :: Attribute
optnone :: Attribute
optsize :: Attribute
patchableFunction :: Attribute
probeStack :: Attribute
readnone :: Attribute
readonly :: Attribute
stackProbeSize :: Attribute
noStackArgProbe :: Attribute
writeonly :: Attribute
argmemonly :: Attribute
returnsTwice :: Attribute
safestack :: Attribute
sanitizeAddress :: Attribute
sanitizeMemory :: Attribute
sanitizeThread :: Attribute
sanitizeHwaddress :: Attribute
sanitizeMemtag :: Attribute
speculativeLoadHardening :: Attribute
speculatable :: Attribute
ssp :: Attribute
sspreq :: Attribute
sspstrong :: Attribute
strictfp :: Attribute
uwtable :: Attribute
nocfCheck :: Attribute
shadowcallstack :: Attribute
module LLVM.Core.Guided
-- | An ExecutionEngine is JIT compiler that is used to generate
-- code for an LLVM module.
module LLVM.ExecutionEngine
data EngineAccess a
data ExecutionEngine
getEngine :: EngineAccess ExecutionEngine
runEngineAccess :: () => EngineAccess a -> IO a
runEngineAccessWithModule :: () => Module -> EngineAccess a -> IO a
addModule :: Module -> EngineAccess ()
class ExecutionFunction f
type Importer f = FunPtr f -> f
getExecutionFunction :: ExecutionFunction f => Importer f -> Function f -> EngineAccess f
getPointerToFunction :: () => Function f -> EngineAccess (FunPtr f)
addFunctionValue :: () => Function f -> FunPtr f -> EngineAccess ()
addGlobalMappings :: GlobalMappings -> EngineAccess ()
-- | Class of LLVM function types that can be translated to the
-- corresponding Haskell type.
class Translatable f
class Generic a
-- | Generate a Haskell function from an LLVM function.
--
-- Note that the function is compiled for every call (Just-In-Time
-- compilation). If you want to compile the function once and call it a
-- lot of times then you should better use getPointerToFunction.
generateFunction :: Translatable f => Function f -> EngineAccess f
class Unsafe a
unsafeRemoveIO :: Unsafe a => a -> RemoveIO a
-- | Translate a function to Haskell code. This is a simplified interface
-- to the execution engine and module mechanism. It is based on
-- generateFunction, so see there for limitations.
simpleFunction :: Translatable f => CodeGenModule (Function f) -> IO f
-- | Combine simpleFunction and unsafeRemoveIO.
unsafeGenerateFunction :: (Unsafe t, Translatable t) => CodeGenModule (Function t) -> RemoveIO t
class IsType a => Marshal a
peek :: Marshal a => Ptr a -> IO a
poke :: Marshal a => Ptr a -> a -> IO ()
class IsPrimitive a => MarshalVector a
peekVector :: (MarshalVector a, Positive n) => Ptr (Vector n a) -> IO (Vector n a)
pokeVector :: (MarshalVector a, Positive n) => Ptr (Vector n a) -> Vector n a -> IO ()
sizeOf :: IsType a => Proxy a -> Int
alignment :: IsType a => Proxy a -> Int
class StructFields fields => StructFields fields
sizeOfArray :: IsType a => Proxy a -> Int -> Int
pokeList :: Marshal a => Ptr a -> [a] -> IO ()
with :: Marshal a => a -> (Ptr a -> IO b) -> IO b
alloca :: IsType a => (Ptr a -> IO b) -> IO b
newtype Stored a
Stored :: a -> Stored a
[getStored] :: Stored a -> a
castToStoredPtr :: () => Ptr a -> Ptr (Stored a)
castFromStoredPtr :: () => Ptr (Stored a) -> Ptr a
instance LLVM.ExecutionEngine.Unsafe b => LLVM.ExecutionEngine.Unsafe (a -> b)
instance LLVM.ExecutionEngine.Unsafe (GHC.Types.IO a)
instance (LLVM.ExecutionEngine.Engine.Generic a, LLVM.ExecutionEngine.Translatable b) => LLVM.ExecutionEngine.Translatable (a -> b)
instance LLVM.ExecutionEngine.Engine.Generic a => LLVM.ExecutionEngine.Translatable (GHC.Types.IO a)
module LLVM.Util.File
writeCodeGenModule :: FilePath -> CodeGenModule a -> IO ()
module LLVM.Util.Intrinsic
min :: IsArithmetic a => Value a -> Value a -> CodeGenFunction r (Value a)
max :: IsArithmetic a => Value a -> Value a -> CodeGenFunction r (Value a)
abs :: IsArithmetic a => Value a -> CodeGenFunction r (Value a)
truncate :: IsFloating a => Value a -> CodeGenFunction r (Value a)
floor :: IsFloating a => Value a -> CodeGenFunction r (Value a)
-- | Available since LLVM-8.
maybeUAddSat :: IsInteger a => Maybe (Value a -> Value a -> CodeGenFunction r (Value a))
-- | Available since LLVM-8.
maybeSAddSat :: IsInteger a => Maybe (Value a -> Value a -> CodeGenFunction r (Value a))
-- | Available since LLVM-8.
maybeUSubSat :: IsInteger a => Maybe (Value a -> Value a -> CodeGenFunction r (Value a))
-- | Available since LLVM-8.
maybeSSubSat :: IsInteger a => Maybe (Value a -> Value a -> CodeGenFunction r (Value a))
call1 :: IsFirstClass a => String -> Value a -> CodeGenFunction r (Value a)
call2 :: IsFirstClass a => String -> Value a -> Value a -> CodeGenFunction r (Value a)
module LLVM.Util.Loop
class Phi a
phis :: Phi a => BasicBlock -> a -> CodeGenFunction r a
addPhis :: Phi a => BasicBlock -> a -> a -> CodeGenFunction r ()
forLoop :: forall i a r. (Phi a, Num i, IsConst i, IsInteger i, IsFirstClass i, CmpRet i, CmpResult i ~ Bool) => Value i -> Value i -> a -> (Value i -> a -> CodeGenFunction r a) -> CodeGenFunction r a
mapVector :: forall a b n r. (Positive n, IsPrimitive a, IsPrimitive b) => (Value a -> CodeGenFunction r (Value b)) -> Value (Vector n a) -> CodeGenFunction r (Value (Vector n b))
mapVector2 :: forall a b c n r. (Positive n, IsPrimitive a, IsPrimitive b, IsPrimitive c) => (Value a -> Value b -> CodeGenFunction r (Value c)) -> Value (Vector n a) -> Value (Vector n b) -> CodeGenFunction r (Value (Vector n c))
instance LLVM.Util.Loop.Phi ()
instance LLVM.Core.Type.IsFirstClass a => LLVM.Util.Loop.Phi (LLVM.Core.CodeGen.Value a)
instance (LLVM.Util.Loop.Phi a, LLVM.Util.Loop.Phi b) => LLVM.Util.Loop.Phi (a, b)
instance (LLVM.Util.Loop.Phi a, LLVM.Util.Loop.Phi b, LLVM.Util.Loop.Phi c) => LLVM.Util.Loop.Phi (a, b, c)
module LLVM.Util.Arithmetic
-- | Synonym for CodeGenFunction r (Value a).
type TValue r a = CodeGenFunction r (Value a)
-- | Comparison functions.
(%==) :: CmpRet a => TValue r a -> TValue r a -> TValue r (CmpResult a)
infix 4 %==
-- | Comparison functions.
(%/=) :: CmpRet a => TValue r a -> TValue r a -> TValue r (CmpResult a)
infix 4 %/=
-- | Comparison functions.
(%<) :: CmpRet a => TValue r a -> TValue r a -> TValue r (CmpResult a)
infix 4 %<
-- | Comparison functions.
(%<=) :: CmpRet a => TValue r a -> TValue r a -> TValue r (CmpResult a)
infix 4 %<=
-- | Comparison functions.
(%>) :: CmpRet a => TValue r a -> TValue r a -> TValue r (CmpResult a)
infix 4 %>
-- | Comparison functions.
(%>=) :: CmpRet a => TValue r a -> TValue r a -> TValue r (CmpResult a)
infix 4 %>=
-- | Lazy and.
(%&&) :: TValue r Bool -> TValue r Bool -> TValue r Bool
infixr 3 %&&
-- | Lazy or.
(%||) :: TValue r Bool -> TValue r Bool -> TValue r Bool
infixr 2 %||
-- | Conditional, returns first element of the pair when condition is true,
-- otherwise second.
(?) :: IsFirstClass a => TValue r Bool -> (TValue r a, TValue r a) -> TValue r a
infix 0 ?
(??) :: (IsFirstClass a, CmpRet a) => TValue r (CmpResult a) -> (TValue r a, TValue r a) -> TValue r a
infix 0 ??
-- | Return a value from an arithFunction.
retrn :: TValue a a -> CodeGenFunction a ()
-- | Use x <- set $ ... to make a binding.
set :: TValue r a -> CodeGenFunction r (TValue r a)
class (FunA r b ~ a, FunB a ~ b, CodeResult a ~ r) => ArithFunction r a b
-- | Unlift a function with TValue to have Value
-- arguments.
arithFunction :: (ArithFunction r a b, r ~ Result z, Return z b c) => a -> c
-- | Turn (a -> b -> CodeGenFunction r c) into (a ->
-- b -> CodeGenFunction r ()) for r ~ Result c
class (RetB a ~ b, CodeValue a ~ z, RetA z b ~ a) => Return z a b
class (TFunB r a ~ b, TFunA b ~ a, CodeResult b ~ r) => ToArithFunction r a b
-- | Lift a function from having Value arguments to having
-- TValue arguments.
toArithFunction :: ToArithFunction r f g => Function f -> g
-- | Define a recursive arithFunction, gets passed itself as the
-- first argument.
recursiveFunction :: (IsFunction f, FunctionArgs f, code ~ FunctionCodeGen f, ArithFunction r arith open, r ~ Result z, Return z open code, ToArithFunction r f g) => (g -> arith) -> CodeGenModule (Function f)
class CallIntrinsic a
instance (LLVM.Core.Instructions.CmpRet a, LLVM.Util.Arithmetic.CallIntrinsic a, GHC.Float.Floating a, LLVM.Core.CodeGen.IsConst a, LLVM.Core.Type.IsFloating a, LLVM.Core.CodeGen.Value a Data.Type.Equality.~ av) => GHC.Float.Floating (LLVM.Core.CodeGenMonad.CodeGenFunction r av)
instance (LLVM.Core.Instructions.CmpRet a, LLVM.Util.Arithmetic.CallIntrinsic a, GHC.Float.RealFloat a, LLVM.Core.CodeGen.IsConst a, LLVM.Core.Type.IsFloating a, LLVM.Core.CodeGen.Value a Data.Type.Equality.~ av) => GHC.Float.RealFloat (LLVM.Core.CodeGenMonad.CodeGenFunction r av)
instance LLVM.Util.Arithmetic.CallIntrinsic GHC.Types.Float
instance LLVM.Util.Arithmetic.CallIntrinsic GHC.Types.Double
instance (Type.Data.Num.Decimal.Number.Positive n, LLVM.Core.Type.IsPrimitive a, LLVM.Util.Arithmetic.CallIntrinsic a) => LLVM.Util.Arithmetic.CallIntrinsic (LLVM.Core.Data.Vector n a)
instance (LLVM.Core.CodeGen.Value a Data.Type.Equality.~ b) => LLVM.Util.Arithmetic.ToArithFunction r (GHC.Types.IO a) (LLVM.Core.CodeGenMonad.CodeGenFunction r b)
instance (LLVM.Util.Arithmetic.ToArithFunction r b0 b1, LLVM.Core.CodeGenMonad.CodeGenFunction r (LLVM.Core.CodeGen.Value a0) Data.Type.Equality.~ a1) => LLVM.Util.Arithmetic.ToArithFunction r (a0 -> b0) (a1 -> b1)
instance (r Data.Type.Equality.~ ra, r Data.Type.Equality.~ rb, a Data.Type.Equality.~ b) => LLVM.Util.Arithmetic.ArithFunction r (LLVM.Core.CodeGenMonad.CodeGenFunction ra a) (LLVM.Core.CodeGenMonad.CodeGenFunction rb b)
instance (LLVM.Util.Arithmetic.ArithFunction r b0 b1, a0 Data.Type.Equality.~ LLVM.Core.CodeGenMonad.CodeGenFunction r a1) => LLVM.Util.Arithmetic.ArithFunction r (a0 -> b0) (a1 -> b1)
instance (LLVM.Core.Instructions.Ret z, LLVM.Core.Instructions.Result z Data.Type.Equality.~ r, r Data.Type.Equality.~ ra, r Data.Type.Equality.~ rb, z Data.Type.Equality.~ a, unit Data.Type.Equality.~ ()) => LLVM.Util.Arithmetic.Return z (LLVM.Core.CodeGenMonad.CodeGenFunction ra a) (LLVM.Core.CodeGenMonad.CodeGenFunction rb unit)
instance (LLVM.Util.Arithmetic.Return z b0 b1, a0 Data.Type.Equality.~ a1) => LLVM.Util.Arithmetic.Return z (a0 -> b0) (a1 -> b1)
instance GHC.Classes.Eq (LLVM.Core.CodeGenMonad.CodeGenFunction r av)
instance GHC.Classes.Ord (LLVM.Core.CodeGenMonad.CodeGenFunction r av)
instance (LLVM.Core.Type.IsArithmetic a, LLVM.Core.Instructions.CmpRet a, GHC.Num.Num a, LLVM.Core.CodeGen.IsConst a, LLVM.Core.CodeGen.Value a Data.Type.Equality.~ av) => GHC.Num.Num (LLVM.Core.CodeGenMonad.CodeGenFunction r av)
instance (LLVM.Core.Type.IsArithmetic a, LLVM.Core.Instructions.CmpRet a, GHC.Num.Num a, LLVM.Core.CodeGen.IsConst a, LLVM.Core.CodeGen.Value a Data.Type.Equality.~ av) => GHC.Enum.Enum (LLVM.Core.CodeGenMonad.CodeGenFunction r av)
instance (LLVM.Core.Type.IsArithmetic a, LLVM.Core.Instructions.CmpRet a, GHC.Num.Num a, LLVM.Core.CodeGen.IsConst a, LLVM.Core.CodeGen.Value a Data.Type.Equality.~ av) => GHC.Real.Real (LLVM.Core.CodeGenMonad.CodeGenFunction r av)
instance (LLVM.Core.Instructions.CmpRet a, GHC.Num.Num a, LLVM.Core.CodeGen.IsConst a, LLVM.Core.Type.IsInteger a, LLVM.Core.CodeGen.Value a Data.Type.Equality.~ av) => GHC.Real.Integral (LLVM.Core.CodeGenMonad.CodeGenFunction r av)
instance (LLVM.Core.Instructions.CmpRet a, GHC.Real.Fractional a, LLVM.Core.CodeGen.IsConst a, LLVM.Core.Type.IsFloating a, LLVM.Core.CodeGen.Value a Data.Type.Equality.~ av) => GHC.Real.Fractional (LLVM.Core.CodeGenMonad.CodeGenFunction r av)
instance (LLVM.Core.Instructions.CmpRet a, GHC.Real.Fractional a, LLVM.Core.CodeGen.IsConst a, LLVM.Core.Type.IsFloating a, LLVM.Core.CodeGen.Value a Data.Type.Equality.~ av) => GHC.Real.RealFrac (LLVM.Core.CodeGenMonad.CodeGenFunction r av)
module LLVM.Util.Memory
memcpy :: IsLengthType len => CodeGenModule (Value (Ptr Word8) -> Value (Ptr Word8) -> Value len -> Value Word32 -> Value Bool -> CodeGenFunction r ())
memmove :: IsLengthType len => CodeGenModule (Value (Ptr Word8) -> Value (Ptr Word8) -> Value len -> Value Word32 -> Value Bool -> CodeGenFunction r ())
memset :: IsLengthType len => CodeGenModule (Value (Ptr Word8) -> Value Word8 -> Value len -> Value Word32 -> Value Bool -> CodeGenFunction r ())
class IsFirstClass len => IsLengthType len
instance LLVM.Util.Memory.IsLengthType GHC.Types.Word
instance LLVM.Util.Memory.IsLengthType GHC.Word.Word32
instance LLVM.Util.Memory.IsLengthType GHC.Word.Word64
module LLVM.Util.Optimize
-- | Result tells whether the module was modified by any of the passes.
--
-- It is very important that you set target triple and target data layout
-- before optimizing. Otherwise the optimizer will make wrong assumptions
-- and e.g. corrupt your record offsets. See e.g. example/Array for how
-- this can be achieved.
--
-- In the future I might enforce via types that you set target parameters
-- before optimization.
optimizeModule :: Int -> Module -> IO Bool
module LLVM.Util.Proxy
module LLVM.Util.Foreign
with :: Marshal a => a -> (Ptr a -> IO b) -> IO b
alloca :: forall a b. Marshal a => (Ptr a -> IO b) -> IO b
withArrayLen :: Marshal a => [a] -> (Int -> Ptr a -> IO b) -> IO b
proxyFromList :: [a] -> Proxy a