ir-builder-0.1.0.0: Monadic DSL for constructing LLVM IR
Safe HaskellSafe-Inferred
LanguageHaskell2010

LLVM.IRType.Constructors

Description

Smart constructors for common IRType values, including integer types, pointers, floating-point types, and aggregate types.

This module is designed to be imported qualified when name collisions occur with LLVM.IROperand.Constructors:

import qualified LLVM.IRType.Constructors as T
import qualified LLVM.IROperand.Constructors as O

myFunction :: IRBuilder ()
myFunction = do
  x <- add T.i32 (O.i32 10) (O.i32 20)
  ...

Alternatively, import only non-colliding names unqualified:

import LLVM.IRType.Constructors (ptr, void, double)
import LLVM.IROperand.Constructors (local, global, float)
Synopsis

Integer types

Floating-point types

Pointer and void

Aggregate types

Function type

fun :: IRType -> [IRType] -> IRType Source #

Construct a function type: fun retType [paramTypes].

Named type reference

named :: IRName -> IRType Source #

Reference a named type defined elsewhere in the module (e.g. %MyStruct).