-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | A pretty printing library inspired by the llvm binding.
--   
--   A pretty printing library that was inspired by the LLVM binding by
--   Lennart Augustsson. The library provides a monadic interface to a
--   pretty printer, that allows functions to be defined and called,
--   generating the corresponding LLVM assembly when run.
@package llvm-pretty
@version 0.13.1.0

module Text.LLVM.Labels.TH
generateRelabel :: Name -> Name -> ExpQ


module Text.LLVM.Triple.AST

-- | The constructors of this type exactly mirror the LLVM <tt>enum
--   ArchType</tt>, including inconsistent labeling of endianness.
--   Capitalization is taken from the LLVM comments, which are reproduced
--   below.
--   
--   Last updated: LLVM 15.0.1:
--   <a>https://github.com/llvm/llvm-project/blob/llvmorg-15.0.1/llvm/include/llvm/ADT/Triple.h#L46</a>
data Arch
UnknownArch :: Arch

-- | ARM (little endian): arm armv.* xscale
ARM :: Arch

-- | ARM (big endian): armeb
ARMEB :: Arch

-- | AArch64 (little endian): aarch64
AArch64 :: Arch

-- | AArch64 (big endian): aarch64_be
AArch64_BE :: Arch

-- | AArch64 (little endian) ILP32: aarch64_32
AArch64_32 :: Arch

-- | ARC: Synopsys ARC
ARC :: Arch

-- | AVR: Atmel AVR microcontroller
AVR :: Arch

-- | eBPF or extended BPF or 64-bit BPF (little endian)
BPFEL :: Arch

-- | eBPF or extended BPF or 64-bit BPF (big endian)
BPFEB :: Arch

-- | CSKY: csky
CSKY :: Arch

-- | DXIL 32-bit DirectX bytecode
DXIL :: Arch

-- | Hexagon: hexagon
Hexagon :: Arch

-- | LoongArch (32-bit): loongarch32
LoongArch32 :: Arch

-- | LoongArch (64-bit): loongarch64
LoongArch64 :: Arch

-- | M68k: Motorola 680x0 family
M68k :: Arch

-- | MIPS: mips mipsallegrex mipsr6
MIPS :: Arch

-- | MIPSEL: mipsel mipsallegrexe mipsr6el
MIPSEL :: Arch

-- | MIPS64: mips64 mips64r6 mipsn32 mipsn32r6
MIPS64 :: Arch

-- | MIPS64EL: mips64el mips64r6el mipsn32el mipsn32r6el
MIPS64EL :: Arch

-- | MSP430: msp430
MSP430 :: Arch

-- | PPC: powerpc
PPC :: Arch

-- | PPCLE: powerpc (little endian)
PPCLE :: Arch

-- | PPC64: powerpc64 ppu
PPC64 :: Arch

-- | PPC64LE: powerpc64le
PPC64LE :: Arch

-- | R600: AMD GPUs HD2XXX - HD6XXX
R600 :: Arch

-- | AMDGCN: AMD GCN GPUs
AMDGCN :: Arch

-- | RISC-V (32-bit): riscv32
RISCV32 :: Arch

-- | RISC-V (64-bit): riscv64
RISCV64 :: Arch

-- | Sparc: sparc
Sparc :: Arch

-- | Sparcv9: Sparcv9
Sparcv9 :: Arch

-- | Sparc: (endianness = little). NB: <tt>Sparcle</tt> is a CPU variant
SparcEL :: Arch

-- | SystemZ: s390x
SystemZ :: Arch

-- | TCE (http:/<i>tce.cs.tut.fi</i>): tce
TCE :: Arch

-- | TCE little endian (http:/<i>tce.cs.tut.fi</i>): tcele
TCELE :: Arch

-- | Thumb (little endian): thumb thumbv.*
Thumb :: Arch

-- | Thumb (big endian): thumbeb
ThumbEB :: Arch

-- | X86: i[3-9]86
X86 :: Arch

-- | X86-64: amd64 x86_64
X86_64 :: Arch

-- | XCore: xcore
XCore :: Arch

-- | NVPTX: 32-bit
NVPTX :: Arch

-- | NVPTX: 64-bit
NVPTX64 :: Arch

-- | le32: generic little-endian 32-bit CPU (PNaCl)
Le32 :: Arch

-- | le64: generic little-endian 64-bit CPU (PNaCl)
Le64 :: Arch

-- | AMDIL
AMDIL :: Arch

-- | AMDIL with 64-bit pointers
AMDIL64 :: Arch

-- | AMD HSAIL
HSAIL :: Arch

-- | AMD HSAIL with 64-bit pointers
HSAIL64 :: Arch

-- | SPIR: standard portable IR for OpenCL 32-bit version
SPIR :: Arch

-- | SPIR: standard portable IR for OpenCL 64-bit version
SPIR64 :: Arch

-- | SPIR-V with 32-bit pointers
SPIRV32 :: Arch

-- | SPIR-V with 64-bit pointers
SPIRV64 :: Arch

-- | Kalimba: generic kalimba
Kalimba :: Arch

-- | SHAVE: Movidius vector VLIW processors
SHAVE :: Arch

-- | Lanai: Lanai 32-bit
Lanai :: Arch

-- | WebAssembly with 32-bit pointers
Wasm32 :: Arch

-- | WebAssembly with 64-bit pointers
Wasm64 :: Arch

-- | 32-bit RenderScript
RenderScript32 :: Arch

-- | 64-bit RenderScript
RenderScript64 :: Arch

-- | NEC SX-Aurora Vector Engine
VE :: Arch

-- | The constructors of this type exactly mirror the LLVM <tt>enum
--   SubArchType</tt>.
--   
--   Last updated: LLVM 15.0.1:
--   <a>https://github.com/llvm/llvm-project/blob/llvmorg-15.0.1/llvm/include/llvm/ADT/Triple.h#L110</a>
data SubArch
NoSubArch :: SubArch
ARMSubArch_v9_3a :: SubArch
ARMSubArch_v9_2a :: SubArch
ARMSubArch_v9_1a :: SubArch
ARMSubArch_v9 :: SubArch
ARMSubArch_v8_8a :: SubArch
ARMSubArch_v8_7a :: SubArch
ARMSubArch_v8_6a :: SubArch
ARMSubArch_v8_5a :: SubArch
ARMSubArch_v8_4a :: SubArch
ARMSubArch_v8_3a :: SubArch
ARMSubArch_v8_2a :: SubArch
ARMSubArch_v8_1a :: SubArch
ARMSubArch_v8 :: SubArch
ARMSubArch_v8r :: SubArch
ARMSubArch_v8m_baseline :: SubArch
ARMSubArch_v8m_mainline :: SubArch
ARMSubArch_v8_1m_mainline :: SubArch
ARMSubArch_v7 :: SubArch
ARMSubArch_v7em :: SubArch
ARMSubArch_v7m :: SubArch
ARMSubArch_v7s :: SubArch
ARMSubArch_v7k :: SubArch
ARMSubArch_v7ve :: SubArch
ARMSubArch_v6 :: SubArch
ARMSubArch_v6m :: SubArch
ARMSubArch_v6k :: SubArch
ARMSubArch_v6t2 :: SubArch
ARMSubArch_v5 :: SubArch
ARMSubArch_v5te :: SubArch
ARMSubArch_v4t :: SubArch
AArch64SubArch_arm64e :: SubArch
KalimbaSubArch_v3 :: SubArch
KalimbaSubArch_v4 :: SubArch
KalimbaSubArch_v5 :: SubArch
MipsSubArch_r6 :: SubArch
PPCSubArch_spe :: SubArch
SPIRVSubArch_v10 :: SubArch
SPIRVSubArch_v11 :: SubArch
SPIRVSubArch_v12 :: SubArch
SPIRVSubArch_v13 :: SubArch
SPIRVSubArch_v14 :: SubArch
SPIRVSubArch_v15 :: SubArch

-- | The constructors of this type exactly mirror the LLVM <tt>enum
--   VendorType</tt>, including ordering and grouping.
--   
--   Last updated: LLVM 15.0.1:
--   <a>https://github.com/llvm/llvm-project/blob/llvmorg-15.0.1/llvm/include/llvm/ADT/Triple.h#L162</a>
data Vendor
UnknownVendor :: Vendor
Apple :: Vendor
PC :: Vendor
SCEI :: Vendor
Freescale :: Vendor
IBM :: Vendor
ImaginationTechnologies :: Vendor
MipsTechnologies :: Vendor
NVIDIA :: Vendor
CSR :: Vendor
Myriad :: Vendor
AMD :: Vendor
Mesa :: Vendor
SUSE :: Vendor
OpenEmbedded :: Vendor

-- | The constructors of this type exactly mirror the LLVM <tt>enum
--   OSType</tt>, including ordering and grouping.
--   
--   End-of-line comments from LLVM are reproduced as constructor comments.
--   
--   Last updated: LLVM 15.0.1:
--   <a>https://github.com/llvm/llvm-project/blob/llvmorg-15.0.1/llvm/include/llvm/ADT/Triple.h#L181</a>
data OS
UnknownOS :: OS
Ananas :: OS
CloudABI :: OS
Darwin :: OS
DragonFly :: OS
FreeBSD :: OS
Fuchsia :: OS
IOS :: OS
KFreeBSD :: OS
Linux :: OS

-- | PS3
Lv2 :: OS
MacOSX :: OS
NetBSD :: OS
OpenBSD :: OS
Solaris :: OS
Win32 :: OS
ZOS :: OS
Haiku :: OS
Minix :: OS
RTEMS :: OS

-- | Native Client
NaCl :: OS
AIX :: OS

-- | NVIDIA CUDA
CUDA :: OS

-- | NVIDIA OpenCL
NVCL :: OS

-- | AMD HSA Runtime
AMDHSA :: OS
PS4 :: OS
PS5 :: OS
ELFIAMCU :: OS

-- | Apple tvOS
TvOS :: OS

-- | Apple watchOS
WatchOS :: OS

-- | Apple DriverKit
DriverKit :: OS
Mesa3D :: OS
Contiki :: OS

-- | AMD PAL Runtime
AMDPAL :: OS

-- | HermitCore Unikernel/Multikernel
HermitCore :: OS

-- | GNU/Hurd
Hurd :: OS

-- | Experimental WebAssembly OS
WASI :: OS
Emscripten :: OS

-- | DirectX ShaderModel
ShaderModel :: OS

-- | The constructors of this type exactly mirror the LLVM <tt>enum
--   EnvironmentType</tt>, including ordering and grouping.
--   
--   End-of-line comments from LLVM are reproduced as constructor comments.
--   
--   Last updated: LLVM 15.0.1:
--   <a>https://github.com/llvm/llvm-project/blob/llvmorg-15.0.1/llvm/include/llvm/ADT/Triple.h#L224</a>
data Environment
UnknownEnvironment :: Environment
GNU :: Environment
GNUABIN32 :: Environment
GNUABI64 :: Environment
GNUEABI :: Environment
GNUEABIHF :: Environment
GNUX32 :: Environment
GNUILP32 :: Environment
CODE16 :: Environment
EABI :: Environment
EABIHF :: Environment
Android :: Environment
Musl :: Environment
MuslEABI :: Environment
MuslEABIHF :: Environment
MuslX32 :: Environment
MSVC :: Environment
Itanium :: Environment
Cygnus :: Environment
CoreCLR :: Environment

-- | Simulator variants of other systems e.g. Apple's iOS
Simulator :: Environment

-- | Mac Catalyst variant of Apple's iOS deployment target.
MacABI :: Environment
Pixel :: Environment
Vertex :: Environment
Geometry :: Environment
Hull :: Environment
Domain :: Environment
Compute :: Environment
Library :: Environment
RayGeneration :: Environment
Intersection :: Environment
AnyHit :: Environment
ClosestHit :: Environment
Miss :: Environment
Callable :: Environment
Mesh :: Environment
Amplification :: Environment

-- | The constructors of this type exactly mirror the LLVM <tt>enum
--   ObjectFormatType</tt>, including ordering.
--   
--   Last updated: LLVM 15.0.1:
--   <a>https://github.com/llvm/llvm-project/blob/llvmorg-15.0.1/llvm/include/llvm/ADT/Triple.h#L269</a>
data ObjectFormat
UnknownObjectFormat :: ObjectFormat
COFF :: ObjectFormat
DXContainer :: ObjectFormat
ELF :: ObjectFormat
GOFF :: ObjectFormat
MachO :: ObjectFormat
SPIRV :: ObjectFormat
Wasm :: ObjectFormat
XCOFF :: ObjectFormat

-- | More like a sextuple than a triple, if you think about it.
--   
--   The LLVM version of this holds onto the un-normalized string
--   representation. We discard it.
data TargetTriple
TargetTriple :: Arch -> SubArch -> Vendor -> OS -> Environment -> ObjectFormat -> TargetTriple
[ttArch] :: TargetTriple -> Arch
[ttSubArch] :: TargetTriple -> SubArch
[ttVendor] :: TargetTriple -> Vendor
[ttOS] :: TargetTriple -> OS
[ttEnv] :: TargetTriple -> Environment
[ttObjFmt] :: TargetTriple -> ObjectFormat
instance GHC.Internal.Enum.Bounded Text.LLVM.Triple.AST.Arch
instance GHC.Internal.Enum.Bounded Text.LLVM.Triple.AST.Environment
instance GHC.Internal.Enum.Bounded Text.LLVM.Triple.AST.OS
instance GHC.Internal.Enum.Bounded Text.LLVM.Triple.AST.ObjectFormat
instance GHC.Internal.Enum.Bounded Text.LLVM.Triple.AST.SubArch
instance GHC.Internal.Enum.Bounded Text.LLVM.Triple.AST.TargetTriple
instance GHC.Internal.Enum.Bounded Text.LLVM.Triple.AST.Vendor
instance GHC.Internal.Data.Data.Data Text.LLVM.Triple.AST.Arch
instance GHC.Internal.Data.Data.Data Text.LLVM.Triple.AST.Environment
instance GHC.Internal.Data.Data.Data Text.LLVM.Triple.AST.OS
instance GHC.Internal.Data.Data.Data Text.LLVM.Triple.AST.ObjectFormat
instance GHC.Internal.Data.Data.Data Text.LLVM.Triple.AST.SubArch
instance GHC.Internal.Data.Data.Data Text.LLVM.Triple.AST.TargetTriple
instance GHC.Internal.Data.Data.Data Text.LLVM.Triple.AST.Vendor
instance GHC.Internal.Enum.Enum Text.LLVM.Triple.AST.Arch
instance GHC.Internal.Enum.Enum Text.LLVM.Triple.AST.Environment
instance GHC.Internal.Enum.Enum Text.LLVM.Triple.AST.OS
instance GHC.Internal.Enum.Enum Text.LLVM.Triple.AST.ObjectFormat
instance GHC.Internal.Enum.Enum Text.LLVM.Triple.AST.SubArch
instance GHC.Internal.Enum.Enum Text.LLVM.Triple.AST.Vendor
instance GHC.Classes.Eq Text.LLVM.Triple.AST.Arch
instance GHC.Classes.Eq Text.LLVM.Triple.AST.Environment
instance GHC.Classes.Eq Text.LLVM.Triple.AST.OS
instance GHC.Classes.Eq Text.LLVM.Triple.AST.ObjectFormat
instance GHC.Classes.Eq Text.LLVM.Triple.AST.SubArch
instance GHC.Classes.Eq Text.LLVM.Triple.AST.TargetTriple
instance GHC.Classes.Eq Text.LLVM.Triple.AST.Vendor
instance GHC.Internal.Generics.Generic Text.LLVM.Triple.AST.Arch
instance GHC.Internal.Generics.Generic Text.LLVM.Triple.AST.Environment
instance GHC.Internal.Generics.Generic Text.LLVM.Triple.AST.OS
instance GHC.Internal.Generics.Generic Text.LLVM.Triple.AST.ObjectFormat
instance GHC.Internal.Generics.Generic Text.LLVM.Triple.AST.SubArch
instance GHC.Internal.Generics.Generic Text.LLVM.Triple.AST.TargetTriple
instance GHC.Internal.Generics.Generic Text.LLVM.Triple.AST.Vendor
instance GHC.Internal.Base.Monoid Text.LLVM.Triple.AST.Arch
instance GHC.Internal.Base.Monoid Text.LLVM.Triple.AST.Environment
instance GHC.Internal.Base.Monoid Text.LLVM.Triple.AST.OS
instance GHC.Internal.Base.Monoid Text.LLVM.Triple.AST.ObjectFormat
instance GHC.Internal.Base.Monoid Text.LLVM.Triple.AST.SubArch
instance GHC.Internal.Base.Monoid Text.LLVM.Triple.AST.TargetTriple
instance GHC.Internal.Base.Monoid Text.LLVM.Triple.AST.Vendor
instance GHC.Classes.Ord Text.LLVM.Triple.AST.Arch
instance GHC.Classes.Ord Text.LLVM.Triple.AST.Environment
instance GHC.Classes.Ord Text.LLVM.Triple.AST.OS
instance GHC.Classes.Ord Text.LLVM.Triple.AST.ObjectFormat
instance GHC.Classes.Ord Text.LLVM.Triple.AST.SubArch
instance GHC.Classes.Ord Text.LLVM.Triple.AST.TargetTriple
instance GHC.Classes.Ord Text.LLVM.Triple.AST.Vendor
instance GHC.Internal.Read.Read Text.LLVM.Triple.AST.Arch
instance GHC.Internal.Read.Read Text.LLVM.Triple.AST.Environment
instance GHC.Internal.Read.Read Text.LLVM.Triple.AST.OS
instance GHC.Internal.Read.Read Text.LLVM.Triple.AST.ObjectFormat
instance GHC.Internal.Read.Read Text.LLVM.Triple.AST.SubArch
instance GHC.Internal.Read.Read Text.LLVM.Triple.AST.TargetTriple
instance GHC.Internal.Read.Read Text.LLVM.Triple.AST.Vendor
instance GHC.Internal.Base.Semigroup Text.LLVM.Triple.AST.Arch
instance GHC.Internal.Base.Semigroup Text.LLVM.Triple.AST.Environment
instance GHC.Internal.Base.Semigroup Text.LLVM.Triple.AST.OS
instance GHC.Internal.Base.Semigroup Text.LLVM.Triple.AST.ObjectFormat
instance GHC.Internal.Base.Semigroup Text.LLVM.Triple.AST.SubArch
instance GHC.Internal.Base.Semigroup Text.LLVM.Triple.AST.TargetTriple
instance GHC.Internal.Base.Semigroup Text.LLVM.Triple.AST.Vendor
instance GHC.Internal.Show.Show Text.LLVM.Triple.AST.Arch
instance GHC.Internal.Show.Show Text.LLVM.Triple.AST.Environment
instance GHC.Internal.Show.Show Text.LLVM.Triple.AST.OS
instance GHC.Internal.Show.Show Text.LLVM.Triple.AST.ObjectFormat
instance GHC.Internal.Show.Show Text.LLVM.Triple.AST.SubArch
instance GHC.Internal.Show.Show Text.LLVM.Triple.AST.TargetTriple
instance GHC.Internal.Show.Show Text.LLVM.Triple.AST.Vendor


-- | Because this library supports many LLVM versions, it is possible to
--   construct an AST with the types in this module that only some LLVM
--   versions will accept. These cases are usually documented in the
--   Haddocks for the relevant data types. When trying to pretty-print
--   constructions that are unsupported by the current LLVM version,
--   pretty-printing may <a>error</a>.
--   
--   At the same time, while the AST coverage is fairly extensive, it is
--   also incomplete: there are some values that new LLVM versions would
--   accept but are not yet represented here.
module Text.LLVM.AST
data Module
Module :: Maybe String -> TargetTriple -> DataLayout -> [TypeDecl] -> [NamedMd] -> [UnnamedMd] -> Map String SelectionKind -> [Global] -> [Declare] -> [Define] -> InlineAsm -> [GlobalAlias] -> Module
[modSourceName] :: Module -> Maybe String

-- | target triple
[modTriple] :: Module -> TargetTriple

-- | type size and alignment information
[modDataLayout] :: Module -> DataLayout

-- | top-level type aliases
[modTypes] :: Module -> [TypeDecl]
[modNamedMd] :: Module -> [NamedMd]
[modUnnamedMd] :: Module -> [UnnamedMd]
[modComdat] :: Module -> Map String SelectionKind

-- | global value declarations
[modGlobals] :: Module -> [Global]

-- | external function declarations (without definitions)
[modDeclares] :: Module -> [Declare]

-- | internal function declarations (with definitions)
[modDefines] :: Module -> [Define]
[modInlineAsm] :: Module -> InlineAsm
[modAliases] :: Module -> [GlobalAlias]
emptyModule :: Module
data NamedMd
NamedMd :: String -> [Int] -> NamedMd
[nmName] :: NamedMd -> String
[nmValues] :: NamedMd -> [Int]
data UnnamedMd
UnnamedMd :: !Int -> ValMd -> Bool -> UnnamedMd
[umIndex] :: UnnamedMd -> !Int
[umValues] :: UnnamedMd -> ValMd
[umDistinct] :: UnnamedMd -> Bool
data GlobalAlias
GlobalAlias :: Maybe Linkage -> Maybe Visibility -> Symbol -> Type -> Value -> GlobalAlias
[aliasLinkage] :: GlobalAlias -> Maybe Linkage
[aliasVisibility] :: GlobalAlias -> Maybe Visibility
[aliasName] :: GlobalAlias -> Symbol
[aliasType] :: GlobalAlias -> Type
[aliasTarget] :: GlobalAlias -> Value
type DataLayout = [LayoutSpec]
data LayoutSpec
BigEndian :: LayoutSpec
LittleEndian :: LayoutSpec

-- | address space, size, abi, pref
PointerSize :: !Int -> !Int -> !Int -> Maybe Int -> LayoutSpec

-- | size, abi, pref
IntegerSize :: !Int -> !Int -> Maybe Int -> LayoutSpec

-- | size, abi, pref
VectorSize :: !Int -> !Int -> Maybe Int -> LayoutSpec

-- | size, abi, pref
FloatSize :: !Int -> !Int -> Maybe Int -> LayoutSpec

-- | size, abi, pref
StackObjSize :: !Int -> !Int -> Maybe Int -> LayoutSpec

-- | size, abi, pref
AggregateSize :: !Int -> !Int -> Maybe Int -> LayoutSpec
NativeIntSize :: [Int] -> LayoutSpec

-- | size
StackAlign :: !Int -> LayoutSpec

-- | type, abi
FunctionPointerAlign :: !FunctionPointerAlignType -> !Int -> LayoutSpec
Mangling :: Mangling -> LayoutSpec

-- | How should a function pointer be aligned?
data FunctionPointerAlignType

-- | The alignment of function pointers is independent of the alignment of
--   functions.
IndependentOfFunctionAlign :: FunctionPointerAlignType

-- | The alignment of function pointers is a multiple of the explicit
--   alignment specified on the function.
MultipleOfFunctionAlign :: FunctionPointerAlignType
data Mangling
ElfMangling :: Mangling
MipsMangling :: Mangling
MachOMangling :: Mangling
WindowsCoffMangling :: Mangling

-- | Parse the data layout string.
parseDataLayout :: MonadPlus m => String -> m DataLayout
type InlineAsm = [String]
data SelectionKind
ComdatAny :: SelectionKind
ComdatExactMatch :: SelectionKind
ComdatLargest :: SelectionKind
ComdatNoDuplicates :: SelectionKind
ComdatSameSize :: SelectionKind
newtype Ident
Ident :: String -> Ident
newtype Symbol
Symbol :: String -> Symbol
data PrimType
Label :: PrimType
Void :: PrimType
Integer :: Word32 -> PrimType
FloatType :: FloatType -> PrimType
X86mmx :: PrimType
Metadata :: PrimType
data FloatType
Half :: FloatType
Float :: FloatType
Double :: FloatType
Fp128 :: FloatType
X86_fp80 :: FloatType
PPC_fp128 :: FloatType
type Type = Type' Ident
data Type' ident
PrimType :: PrimType -> Type' ident
Alias :: ident -> Type' ident
Array :: Word64 -> Type' ident -> Type' ident
FunTy :: Type' ident -> [Type' ident] -> Bool -> Type' ident

-- | A pointer to a memory location of a particular type. See also
--   <a>PtrOpaque</a>, which represents a pointer without a pointee type.
--   
--   LLVM pointers can also have an optional address space attribute, but
--   this is not currently represented in the <tt>llvm-pretty</tt> AST.
PtrTo :: Type' ident -> Type' ident

-- | A pointer to a memory location. Unlike <a>PtrTo</a>, a
--   <a>PtrOpaque</a> does not have a pointee type. Instead, instructions
--   interacting through opaque pointers specify the type of the underlying
--   memory they are interacting with.
--   
--   LLVM pointers can also have an optional address space attribute, but
--   this is not currently represented in the <tt>llvm-pretty</tt> AST.
--   
--   <a>PtrOpaque</a> should not be confused with <a>Opaque</a>, which is a
--   completely separate type with a similar-sounding name.
PtrOpaque :: Type' ident
Struct :: [Type' ident] -> Type' ident
PackedStruct :: [Type' ident] -> Type' ident
Vector :: Word64 -> Type' ident -> Type' ident

-- | An opaque structure type, used to represent structure types that do
--   not have a body specified. This is similar to C's notion of a
--   forward-declared structure.
--   
--   <a>Opaque</a> should not be confused with <a>PtrOpaque</a>, which is a
--   completely separate type with a similar-sounding name.
Opaque :: Type' ident

-- | Applicatively traverse a type, updating or removing aliases.
updateAliasesA :: Applicative f => (a -> f (Type' b)) -> Type' a -> f (Type' b)

-- | Traverse a type, updating or removing aliases.
updateAliases :: (a -> Type' b) -> Type' a -> Type' b
isFloatingPoint :: PrimType -> Bool
isAlias :: Type' ident -> Bool
isPrimTypeOf :: (PrimType -> Bool) -> Type' ident -> Bool
isLabel :: PrimType -> Bool
isInteger :: PrimType -> Bool
isVector :: Type' ident -> Bool
isVectorOf :: (Type' ident -> Bool) -> Type' ident -> Bool
isArray :: Type' ident -> Bool
isPointer :: Type' ident -> Bool

-- | Check two <a>Type</a>s for equality, but treat <a>PtrOpaque</a> types
--   as being equal to <tt><a>PtrTo</a> ty</tt> types (for any type
--   <tt>ty</tt>). This is a coarser notion of equality than what is
--   provided by the <a>Eq</a> instance for <a>Type</a>.
eqTypeModuloOpaquePtrs :: Eq ident => Type' ident -> Type' ident -> Bool

-- | Compare two <a>Type</a>s, but treat <a>PtrOpaque</a> types as being
--   equal to <tt><a>PtrTo</a> ty</tt> types (for any type <tt>ty</tt>).
--   This is a coarser notion of ordering than what is provided by the
--   <a>Ord</a> instance for <a>Type</a>.
cmpTypeModuloOpaquePtrs :: Ord ident => Type' ident -> Type' ident -> Ordering

-- | Ensure that if there are any occurrences of opaque pointers, then all
--   non-opaque pointers are converted to opaque ones.
--   
--   This is useful because LLVM tools like <tt>llvm-as</tt> are stricter
--   than <tt>llvm-pretty</tt> in that the former forbids mixing opaque and
--   non-opaque pointers, whereas the latter allows this. As a result, the
--   result of pretty-printing an <tt>llvm-pretty</tt> AST might not be
--   suitable for <tt>llvm-as</tt>'s needs unless you first call this
--   function to ensure that the two types of pointers are not intermixed.
--   
--   This is implemented using <a>Data.Data</a> combinators under the hood,
--   which could potentially require a full traversal of the AST. Because
--   of the performance implications of this, we do not call
--   <a>fixupOpaquePtrs</a> in <tt>llvm-pretty</tt>'s pretty-printer. If
--   you wish to combine opaque and non-opaque pointers in your AST, the
--   burden is on you to call this function before pretty-printing.
fixupOpaquePtrs :: Data a => a -> a
data NullResult lab
HasNull :: Value' lab -> NullResult lab
ResolveNull :: Ident -> NullResult lab
primTypeNull :: PrimType -> Value' lab
floatTypeNull :: FloatType -> Value' lab
typeNull :: Type -> NullResult lab
elimFunTy :: MonadPlus m => Type -> m (Type, [Type], Bool)
elimAlias :: MonadPlus m => Type -> m Ident
elimPtrTo :: MonadPlus m => Type -> m Type
elimVector :: MonadPlus m => Type -> m (Word64, Type)
elimArray :: MonadPlus m => Type -> m (Word64, Type)
elimFunPtr :: MonadPlus m => Type -> m (Type, [Type], Bool)
elimPrimType :: MonadPlus m => Type -> m PrimType
elimFloatType :: MonadPlus m => PrimType -> m FloatType

-- | Eliminator for array, pointer and vector types.
elimSequentialType :: MonadPlus m => Type -> m Type
data TypeDecl
TypeDecl :: Ident -> Type -> TypeDecl
[typeName] :: TypeDecl -> Ident
[typeValue] :: TypeDecl -> Type
data Global
Global :: Symbol -> GlobalAttrs -> Type -> Maybe Value -> Maybe Align -> GlobalMdAttachments -> Global
[globalSym] :: Global -> Symbol
[globalAttrs] :: Global -> GlobalAttrs
[globalType] :: Global -> Type
[globalValue] :: Global -> Maybe Value
[globalAlign] :: Global -> Maybe Align
[globalMetadata] :: Global -> GlobalMdAttachments
addGlobal :: Global -> Module -> Module
data GlobalAttrs
GlobalAttrs :: Maybe Linkage -> Maybe Visibility -> Bool -> GlobalAttrs
[gaLinkage] :: GlobalAttrs -> Maybe Linkage
[gaVisibility] :: GlobalAttrs -> Maybe Visibility
[gaConstant] :: GlobalAttrs -> Bool
emptyGlobalAttrs :: GlobalAttrs
data Declare
Declare :: Maybe Linkage -> Maybe Visibility -> Type -> Symbol -> [Type] -> Bool -> [FunAttr] -> Maybe String -> Declare
[decLinkage] :: Declare -> Maybe Linkage
[decVisibility] :: Declare -> Maybe Visibility
[decRetType] :: Declare -> Type
[decName] :: Declare -> Symbol
[decArgs] :: Declare -> [Type]
[decVarArgs] :: Declare -> Bool
[decAttrs] :: Declare -> [FunAttr]
[decComdat] :: Declare -> Maybe String

-- | The function type of this declaration
decFunType :: Declare -> Type
data Define
Define :: Maybe Linkage -> Maybe Visibility -> Type -> Symbol -> [Typed Ident] -> Bool -> [FunAttr] -> Maybe String -> Maybe GC -> [BasicBlock] -> FnMdAttachments -> Maybe String -> Define
[defLinkage] :: Define -> Maybe Linkage
[defVisibility] :: Define -> Maybe Visibility
[defRetType] :: Define -> Type
[defName] :: Define -> Symbol
[defArgs] :: Define -> [Typed Ident]
[defVarArgs] :: Define -> Bool
[defAttrs] :: Define -> [FunAttr]
[defSection] :: Define -> Maybe String
[defGC] :: Define -> Maybe GC
[defBody] :: Define -> [BasicBlock]
[defMetadata] :: Define -> FnMdAttachments
[defComdat] :: Define -> Maybe String
defFunType :: Define -> Type
addDefine :: Define -> Module -> Module
data FunAttr
AlignStack :: Int -> FunAttr
Alwaysinline :: FunAttr
Builtin :: FunAttr
Cold :: FunAttr
Inlinehint :: FunAttr
Jumptable :: FunAttr
Minsize :: FunAttr
Naked :: FunAttr
Nobuiltin :: FunAttr
Noduplicate :: FunAttr
Noimplicitfloat :: FunAttr
Noinline :: FunAttr
Nonlazybind :: FunAttr
Noredzone :: FunAttr
Noreturn :: FunAttr
Nounwind :: FunAttr
Optnone :: FunAttr
Optsize :: FunAttr
Readnone :: FunAttr
Readonly :: FunAttr
ReturnsTwice :: FunAttr
SanitizeAddress :: FunAttr
SanitizeMemory :: FunAttr
SanitizeThread :: FunAttr
SSP :: FunAttr
SSPreq :: FunAttr
SSPstrong :: FunAttr
UWTable :: FunAttr
data BlockLabel
Named :: Ident -> BlockLabel
Anon :: Int -> BlockLabel
data BasicBlock' lab
BasicBlock :: Maybe lab -> [Stmt' lab] -> BasicBlock' lab
[bbLabel] :: BasicBlock' lab -> Maybe lab
[bbStmts] :: BasicBlock' lab -> [Stmt' lab]
type BasicBlock = BasicBlock' BlockLabel
brTargets :: BasicBlock' lab -> [lab]

-- | Symbol Linkage
data Linkage
Private :: Linkage
LinkerPrivate :: Linkage
LinkerPrivateWeak :: Linkage
LinkerPrivateWeakDefAuto :: Linkage
Internal :: Linkage
AvailableExternally :: Linkage
Linkonce :: Linkage
Weak :: Linkage
Common :: Linkage
Appending :: Linkage
ExternWeak :: Linkage
LinkonceODR :: Linkage
WeakODR :: Linkage
External :: Linkage
DLLImport :: Linkage
DLLExport :: Linkage
data Visibility
DefaultVisibility :: Visibility
HiddenVisibility :: Visibility
ProtectedVisibility :: Visibility
newtype GC
GC :: String -> GC
[getGC] :: GC -> String
data Typed a
Typed :: Type -> a -> Typed a
[typedType] :: Typed a -> Type
[typedValue] :: Typed a -> a
mapMTyped :: Monad m => (a -> m b) -> Typed a -> m (Typed b)
data ArithOp

-- | <ul>
--   <li>Integral addition.</li>
--   <li>First boolean flag: check for unsigned overflow.</li>
--   <li>Second boolean flag: check for signed overflow.</li>
--   <li>If the checks fail, then the result is poisoned.</li>
--   </ul>
Add :: Bool -> Bool -> ArithOp

-- | Floating point addition.
FAdd :: ArithOp

-- | <ul>
--   <li>Integral subtraction.</li>
--   <li>First boolean flag: check for unsigned overflow.</li>
--   <li>Second boolean flag: check for signed overflow.</li>
--   <li>If the checks fail, then the result is poisoned.</li>
--   </ul>
Sub :: Bool -> Bool -> ArithOp

-- | Floating point subtraction.
FSub :: ArithOp

-- | <ul>
--   <li>Integral multiplication.</li>
--   <li>First boolean flag: check for unsigned overflow.</li>
--   <li>Second boolean flag: check for signed overflow.</li>
--   <li>If the checks fail, then the result is poisoned.</li>
--   </ul>
Mul :: Bool -> Bool -> ArithOp

-- | Floating point multiplication.
FMul :: ArithOp

-- | <ul>
--   <li>Integral unsigned division.</li>
--   <li>Boolean flag: check for exact result.</li>
--   <li>If the check fails, then the result is poisoned.</li>
--   </ul>
UDiv :: Bool -> ArithOp

-- | <ul>
--   <li>Integral signed division.</li>
--   <li>Boolean flag: check for exact result.</li>
--   <li>If the check fails, then the result is poisoned.</li>
--   </ul>
SDiv :: Bool -> ArithOp

-- | Floating point division.
FDiv :: ArithOp

-- | Integral unsigned reminder resulting from unsigned division. Division
--   by 0 is undefined.
URem :: ArithOp

-- | <ul>
--   <li>Integral signded reminder resulting from signed division.</li>
--   <li>The sign of the reminder matches the divident (first
--   parameter).</li>
--   <li>Division by 0 is undefined.</li>
--   </ul>
SRem :: ArithOp

-- | <ul>
--   <li>Floating point reminder resulting from floating point
--   division.</li>
--   <li>The reminder has the same sign as the divident (first
--   parameter).</li>
--   </ul>
FRem :: ArithOp
isIArith :: ArithOp -> Bool
isFArith :: ArithOp -> Bool
data UnaryArithOp

-- | Floating point negation.
FNeg :: UnaryArithOp

-- | Binary bitwise operators.
data BitOp

-- | <ul>
--   <li>Shift left.</li>
--   <li>First bool flag: check for unsigned overflow (i.e., shifted out a
--   1).</li>
--   <li>Second bool flag: check for signed overflow (i.e., shifted out
--   something that does not match the sign bit)If a check fails, then the
--   result is poisoned.The value of the second parameter must be strictly
--   less than the number of bits in the first parameter, otherwise the
--   result is undefined.</li>
--   </ul>
Shl :: Bool -> Bool -> BitOp

-- | <ul>
--   <li>Logical shift right.</li>
--   <li>The boolean is for exact check: poison the result, if we shift out
--   a 1 bit (i.e., had to round).</li>
--   </ul>
--   
--   The value of the second parameter must be strictly less than the
--   number of bits in the first parameter, otherwise the result is
--   undefined.
Lshr :: Bool -> BitOp

-- | <ul>
--   <li>Arithmetic shift right.</li>
--   <li>The boolean is for exact check: poison the result, if we shift out
--   a 1 bit (i.e., had to round).</li>
--   </ul>
--   
--   The value of the second parameter must be strictly less than the
--   number of bits in the first parameter, otherwise the result is
--   undefined.
Ashr :: Bool -> BitOp
And :: BitOp
Or :: BitOp
Xor :: BitOp

-- | Conversions from one type to another.
data ConvOp
Trunc :: ConvOp
ZExt :: ConvOp
SExt :: ConvOp
FpTrunc :: ConvOp
FpExt :: ConvOp
FpToUi :: ConvOp
FpToSi :: ConvOp
UiToFp :: ConvOp
SiToFp :: ConvOp
PtrToInt :: ConvOp
IntToPtr :: ConvOp
BitCast :: ConvOp
data AtomicRWOp
AtomicXchg :: AtomicRWOp
AtomicAdd :: AtomicRWOp
AtomicSub :: AtomicRWOp
AtomicAnd :: AtomicRWOp
AtomicNand :: AtomicRWOp
AtomicOr :: AtomicRWOp
AtomicXor :: AtomicRWOp
AtomicMax :: AtomicRWOp
AtomicMin :: AtomicRWOp
AtomicUMax :: AtomicRWOp
AtomicUMin :: AtomicRWOp

-- | Introduced in LLVM 9
AtomicFAdd :: AtomicRWOp

-- | Introduced in LLVM 9
AtomicFSub :: AtomicRWOp

-- | Introduced in LLVM 15
AtomicFMax :: AtomicRWOp

-- | Introduced in LLVM 15
AtomicFMin :: AtomicRWOp

-- | Introduced in LLVM 16
AtomicUIncWrap :: AtomicRWOp

-- | Introduced in LLVM 16
AtomicUDecWrap :: AtomicRWOp
data AtomicOrdering
Unordered :: AtomicOrdering
Monotonic :: AtomicOrdering
Acquire :: AtomicOrdering
Release :: AtomicOrdering
AcqRel :: AtomicOrdering
SeqCst :: AtomicOrdering
type Align = Int
data Instr' lab

-- | <ul>
--   <li>Return from function with the given value.</li>
--   <li>Ends basic block.</li>
--   </ul>
Ret :: Typed (Value' lab) -> Instr' lab

-- | <ul>
--   <li>Return from function.</li>
--   <li>Ends basic block.</li>
--   </ul>
RetVoid :: Instr' lab

-- | <ul>
--   <li>Binary arithmetic operation, both operands have the same
--   type.</li>
--   <li>Middle of basic block.</li>
--   <li>The result is the same as parameters.</li>
--   </ul>
Arith :: ArithOp -> Typed (Value' lab) -> Value' lab -> Instr' lab

-- | <ul>
--   <li>Unary arithmetic operation.</li>
--   <li>Middle of basic block.</li>
--   <li>The result is the same as the parameter.</li>
--   </ul>
UnaryArith :: UnaryArithOp -> Typed (Value' lab) -> Instr' lab

-- | <ul>
--   <li>Binary bit-vector operation, both operands have the same
--   type.</li>
--   <li>Middle of basic block.</li>
--   <li>The result is the same as parameters.</li>
--   </ul>
Bit :: BitOp -> Typed (Value' lab) -> Value' lab -> Instr' lab

-- | <ul>
--   <li>Convert a value from one type to another.</li>
--   <li>Middle of basic block.</li>
--   <li>The result matches the 3rd parameter.</li>
--   </ul>
Conv :: ConvOp -> Typed (Value' lab) -> Type -> Instr' lab

-- | <ul>
--   <li>Call a function. The boolean is tail-call hint (XXX: needs to be
--   updated)</li>
--   <li>Middle of basic block.</li>
--   <li>The result is as indicated by the provided type.</li>
--   </ul>
Call :: Bool -> Type -> Value' lab -> [Typed (Value' lab)] -> Instr' lab

-- | <ul>
--   <li>Call a function in asm-goto style: return type; function operand;
--   arguments; default basic block destination; other basic block
--   destinations.</li>
--   <li>Middle of basic block.</li>
--   <li>The result is as indicated by the provided type.</li>
--   <li>Introduced in LLVM 9.</li>
--   </ul>
CallBr :: Type -> Value' lab -> [Typed (Value' lab)] -> lab -> [lab] -> Instr' lab

-- | <ul>
--   <li>Allocated space on the stack: type of elements; how many elements
--   (1 if <a>Nothing</a>); required alignment.</li>
--   <li>Middle of basic block.</li>
--   <li>Returns a pointer to hold the given number of elements.</li>
--   </ul>
Alloca :: Type -> Maybe (Typed (Value' lab)) -> Maybe Int -> Instr' lab

-- | <ul>
--   <li>Read a value from the given address: type being loaded; address to
--   read from; atomic ordering; assumptions about alignment of the given
--   pointer.</li>
--   <li>Middle of basic block.</li>
--   <li>Returns a value of type matching the pointer.</li>
--   </ul>
Load :: Type -> Typed (Value' lab) -> Maybe AtomicOrdering -> Maybe Align -> Instr' lab

-- | <ul>
--   <li>Write a value to memory: value to store; pointer to location where
--   to store; atomic ordering; assumptions about the alignment of the
--   given pointer.</li>
--   <li>Middle of basic block.</li>
--   <li>Effect.</li>
--   </ul>
Store :: Typed (Value' lab) -> Typed (Value' lab) -> Maybe AtomicOrdering -> Maybe Align -> Instr' lab

-- | <ul>
--   <li>Introduce a happens-before relationship between operations:
--   synchronization scope; type of ordering.</li>
--   <li>Middle of basic block.</li>
--   </ul>
Fence :: Maybe String -> AtomicOrdering -> Instr' lab

-- | <ul>
--   <li>Atomically compare and maybe exchange values in memory: whether
--   the exchange is weak; whether the exchange is volatile; pointer to
--   read; value to compare it with; new value to write if the two prior
--   values are equal; synchronization scope; synchronization ordering on
--   success; synchronization ordering on failure.</li>
--   <li>Returns a pair of the original value and whether an exchange
--   occurred.</li>
--   <li>Middle of basic block.</li>
--   <li>Effect.</li>
--   </ul>
CmpXchg :: Bool -> Bool -> Typed (Value' lab) -> Typed (Value' lab) -> Typed (Value' lab) -> Maybe String -> AtomicOrdering -> AtomicOrdering -> Instr' lab

-- | <ul>
--   <li>Perform an atomic load, operation, and store: whether the
--   operation is volatile; operation to apply to the read value and the
--   provided value; pointer to read; value to combine it with, using the
--   given operation; synchronization scope; synchronization ordering.</li>
--   <li>Returns the original value at the given location.</li>
--   <li>Middle of basic block.</li>
--   <li>Effect.</li>
--   </ul>
AtomicRW :: Bool -> AtomicRWOp -> Typed (Value' lab) -> Typed (Value' lab) -> Maybe String -> AtomicOrdering -> Instr' lab

-- | <ul>
--   <li>Compare two integral values.</li>
--   <li>Middle of basic block.</li>
--   <li>Returns a boolean value.</li>
--   </ul>
ICmp :: ICmpOp -> Typed (Value' lab) -> Value' lab -> Instr' lab

-- | <ul>
--   <li>Compare two floating point values.</li>
--   <li>Middle of basic block.</li>
--   <li>Returns a boolean value.</li>
--   </ul>
FCmp :: FCmpOp -> Typed (Value' lab) -> Value' lab -> Instr' lab

-- | <ul>
--   <li>Join point for an SSA value: we get one value per predecessor
--   basic block.</li>
--   <li>Middle of basic block.</li>
--   <li>Returns a value of the specified type.</li>
--   </ul>
Phi :: Type -> [(Value' lab, lab)] -> Instr' lab

-- | <ul>
--   <li>"Get element pointer", compute the address of a field in a
--   structure: inbounds check (value poisoned if this fails); type to use
--   as a basis for calculations; pointer to parent structure; path to a
--   sub-component of a structure.</li>
--   <li>Middle of basic block.</li>
--   <li>Returns the address of the requested member.</li>
--   </ul>
--   
--   The types in path are the types of the index, not the fields.
--   
--   The indexes are in units of fields (i.e., the first element in a
--   struct is field 0, the next one is 1, etc., regardless of the size of
--   the fields in bytes).
GEP :: Bool -> Type -> Typed (Value' lab) -> [Typed (Value' lab)] -> Instr' lab

-- | <ul>
--   <li>Local if-then-else; the first argument is boolean, if true pick
--   the 2nd argument, otherwise evaluate to the 3rd.</li>
--   <li>Middle of basic block.</li>
--   <li>Returns either the 2nd or the 3rd argument.</li>
--   </ul>
Select :: Typed (Value' lab) -> Typed (Value' lab) -> Value' lab -> Instr' lab

-- | <ul>
--   <li>Get the value of a member of an aggregate value: the first
--   argument is an aggregate value (not a pointer!), the second is a path
--   of indexes, similar to the one in <a>GEP</a>.</li>
--   <li>Middle of basic block.</li>
--   <li>Returns the given member of the aggregate value.</li>
--   </ul>
ExtractValue :: Typed (Value' lab) -> [Int32] -> Instr' lab

-- | <ul>
--   <li>Set the value for a member of an aggregate value: the first
--   argument is the value to insert, the second is the aggreagate value to
--   be modified.</li>
--   <li>Middle of basic block.</li>
--   <li>Returns an updated aggregate value.</li>
--   </ul>
InsertValue :: Typed (Value' lab) -> Typed (Value' lab) -> [Int32] -> Instr' lab

-- | <ul>
--   <li>Get an element from a vector: the first argument is a vector, the
--   second an index.</li>
--   <li>Middle of basic block.</li>
--   <li>Returns the element at the given position.</li>
--   </ul>
ExtractElt :: Typed (Value' lab) -> Value' lab -> Instr' lab

-- | <ul>
--   <li>Modify an element of a vector: the first argument is the vector,
--   the second the value to be inserted, the third is the index where to
--   insert the value.</li>
--   <li>Middle of basic block.</li>
--   <li>Returns an updated vector.</li>
--   </ul>
InsertElt :: Typed (Value' lab) -> Typed (Value' lab) -> Value' lab -> Instr' lab

-- | <ul>
--   <li>Constructs a fixed permutation of two input vectors: the first and
--   second arguments are input vectors, and the third argument is the
--   mask.</li>
--   <li>Middle of basic block.</li>
--   <li>Returns the permuted vector. For each element, the mask selects an
--   element from one of the input vectors to copy to the result:</li>
--   <li>non-negative mask values represent an index into the concatenated
--   pair of input vectors, and</li>
--   <li>-1 mask value indicates that the output element is poison.</li>
--   </ul>
ShuffleVector :: Typed (Value' lab) -> Value' lab -> Typed (Value' lab) -> Instr' lab

-- | <ul>
--   <li>Jump to the given basic block.</li>
--   <li>Ends basic block.</li>
--   </ul>
Jump :: lab -> Instr' lab

-- | <ul>
--   <li>Conditional jump: if the value is true jump to the first basic
--   block, otherwise jump to the second.</li>
--   <li>Ends basic block.</li>
--   </ul>
Br :: Typed (Value' lab) -> lab -> lab -> Instr' lab

-- | <ul>
--   <li>Calls the specified target function, then branches to the success
--   label. If an exception occurs during the call, the exception unwind
--   handling branches to the second label.</li>
--   <li>Arguments: 1. The function's return type 2. The function target
--   itself (to be called) 3. arguments to the function 4. successful
--   return target label 5. on-exception unwind target label</li>
--   <li>Ends basic block.</li>
--   </ul>
Invoke :: Type -> Value' lab -> [Typed (Value' lab)] -> lab -> lab -> Instr' lab

-- | Comment
Comment :: String -> Instr' lab

-- | No defined sematics, we should not get to here.
Unreachable :: Instr' lab
Unwind :: Instr' lab

-- | Accesses arguments passed through "varargs" areas of a function call.
--   The argument is a <tt>va_list*</tt>; this instruction returns the
--   value of the specified type located at the target and increments the
--   pointer.
VaArg :: Typed (Value' lab) -> Type -> Instr' lab

-- | Branch via pointer indirection. The argument is the address of the
--   label to jump to. (All) Possible destination targets are provided.
IndirectBr :: Typed (Value' lab) -> [lab] -> Instr' lab

-- | <ul>
--   <li>Multi-way branch: the first value determines the target index for
--   the jump, which is looked up in the third argument table (key values
--   are unique). The second argument is the default destination if the
--   target is not found in the table.</li>
--   <li>Ends basic block.</li>
--   </ul>
Switch :: Typed (Value' lab) -> lab -> [(Integer, lab)] -> Instr' lab

-- | Target of an exception (from the <a>Invoke</a> instruction). *
--   Arguments: 1. The result type (the values set by the personality
--   function on re-entry to the function). 2. The second argument may be
--   the personality function, which defines values on re-entry. This is
--   used in older LLVM versions and is not supplied for recent LLVM
--   versions. 3. True if this block is a "cleanup". 4. The list of clauses
--   to handle the exception; the clauses are used to match the exception
--   thrown. * If no clause matches and cleanup not set, continue unwinding
--   up the stack (see <a>Resume</a>). * If cleanup is false, there must be
--   at least one clause
LandingPad :: Type -> Maybe (Typed (Value' lab)) -> Bool -> [Clause' lab] -> Instr' lab

-- | Resumes propagation of an in-flight exception whose unwinding was
--   interrupted by a <a>LandingPad</a> instruction. * Argument: the value
--   of the exception to propagate.
Resume :: Typed (Value' lab) -> Instr' lab

-- | <ul>
--   <li>Used to stop propagation of <tt>undef</tt> and <tt>poison</tt>
--   values.</li>
--   <li>If the argument is <tt>undef</tt> or <tt>poison</tt>, returns an
--   arbitrary (but fixed) value of that type instead, otherwise a no-op
--   and returns its argument.</li>
--   <li>Middle of basic block.</li>
--   </ul>
Freeze :: Typed (Value' lab) -> Instr' lab
type Instr = Instr' BlockLabel
data Clause' lab
Catch :: Typed (Value' lab) -> Clause' lab
Filter :: Typed (Value' lab) -> Clause' lab
type Clause = Clause' BlockLabel
isTerminator :: Instr' lab -> Bool
isComment :: Instr' lab -> Bool
isPhi :: Instr' lab -> Bool

-- | Integer comparison operators.
data ICmpOp
Ieq :: ICmpOp
Ine :: ICmpOp
Iugt :: ICmpOp
Iuge :: ICmpOp
Iult :: ICmpOp
Iule :: ICmpOp
Isgt :: ICmpOp
Isge :: ICmpOp
Islt :: ICmpOp
Isle :: ICmpOp

-- | Floating-point comparison operators.
data FCmpOp
Ffalse :: FCmpOp
Foeq :: FCmpOp
Fogt :: FCmpOp
Foge :: FCmpOp
Folt :: FCmpOp
Fole :: FCmpOp
Fone :: FCmpOp
Ford :: FCmpOp
Fueq :: FCmpOp
Fugt :: FCmpOp
Fuge :: FCmpOp
Fult :: FCmpOp
Fule :: FCmpOp
Fune :: FCmpOp
Funo :: FCmpOp
Ftrue :: FCmpOp
data Value' lab
ValInteger :: Integer -> Value' lab
ValBool :: Bool -> Value' lab
ValFloat :: Float -> Value' lab
ValDouble :: Double -> Value' lab
ValFP80 :: FP80Value -> Value' lab
ValIdent :: Ident -> Value' lab
ValSymbol :: Symbol -> Value' lab
ValNull :: Value' lab
ValArray :: Type -> [Value' lab] -> Value' lab
ValVector :: Type -> [Value' lab] -> Value' lab
ValStruct :: [Typed (Value' lab)] -> Value' lab
ValPackedStruct :: [Typed (Value' lab)] -> Value' lab
ValString :: [Word8] -> Value' lab
ValConstExpr :: ConstExpr' lab -> Value' lab
ValUndef :: Value' lab
ValLabel :: lab -> Value' lab
ValZeroInit :: Value' lab
ValAsm :: Bool -> Bool -> String -> String -> Value' lab
ValMd :: ValMd' lab -> Value' lab
ValPoison :: Value' lab
type Value = Value' BlockLabel
data FP80Value
FP80_LongDouble :: Word16 -> Word64 -> FP80Value
data ValMd' lab
ValMdString :: String -> ValMd' lab
ValMdValue :: Typed (Value' lab) -> ValMd' lab
ValMdRef :: Int -> ValMd' lab
ValMdNode :: [Maybe (ValMd' lab)] -> ValMd' lab
ValMdLoc :: DebugLoc' lab -> ValMd' lab
ValMdDebugInfo :: DebugInfo' lab -> ValMd' lab
type ValMd = ValMd' BlockLabel
type KindMd = String
type FnMdAttachments = Map KindMd ValMd
type GlobalMdAttachments = Map KindMd ValMd
data DebugLoc' lab
DebugLoc :: Word32 -> Word32 -> ValMd' lab -> Maybe (ValMd' lab) -> Bool -> DebugLoc' lab
[dlLine] :: DebugLoc' lab -> Word32
[dlCol] :: DebugLoc' lab -> Word32
[dlScope] :: DebugLoc' lab -> ValMd' lab
[dlIA] :: DebugLoc' lab -> Maybe (ValMd' lab)
[dlImplicit] :: DebugLoc' lab -> Bool
type DebugLoc = DebugLoc' BlockLabel
isConst :: Value' lab -> Bool
elimValSymbol :: MonadPlus m => Value' lab -> m Symbol
elimValInteger :: MonadPlus m => Value' lab -> m Integer
data Stmt' lab
Result :: Ident -> Instr' lab -> [(String, ValMd' lab)] -> Stmt' lab
Effect :: Instr' lab -> [(String, ValMd' lab)] -> Stmt' lab
type Stmt = Stmt' BlockLabel
stmtInstr :: Stmt' lab -> Instr' lab
stmtMetadata :: Stmt' lab -> [(String, ValMd' lab)]
extendMetadata :: (String, ValMd' lab) -> Stmt' lab -> Stmt' lab
data ConstExpr' lab

-- | Since LLVM 3.7, constant <tt>getelementptr</tt> expressions include an
--   explicit type to use as a basis for calculations. For older versions
--   of LLVM, this type can be reconstructed by inspecting the pointee type
--   of the parent pointer value.
ConstGEP :: Bool -> Maybe Word64 -> Type -> Typed (Value' lab) -> [Typed (Value' lab)] -> ConstExpr' lab
ConstConv :: ConvOp -> Typed (Value' lab) -> Type -> ConstExpr' lab
ConstSelect :: Typed (Value' lab) -> Typed (Value' lab) -> Typed (Value' lab) -> ConstExpr' lab
ConstBlockAddr :: Typed (Value' lab) -> lab -> ConstExpr' lab
ConstFCmp :: FCmpOp -> Typed (Value' lab) -> Typed (Value' lab) -> ConstExpr' lab
ConstICmp :: ICmpOp -> Typed (Value' lab) -> Typed (Value' lab) -> ConstExpr' lab
ConstArith :: ArithOp -> Typed (Value' lab) -> Value' lab -> ConstExpr' lab
ConstUnaryArith :: UnaryArithOp -> Typed (Value' lab) -> ConstExpr' lab
ConstBit :: BitOp -> Typed (Value' lab) -> Value' lab -> ConstExpr' lab
type ConstExpr = ConstExpr' BlockLabel
data DebugInfo' lab
DebugInfoBasicType :: DIBasicType -> DebugInfo' lab
DebugInfoCompileUnit :: DICompileUnit' lab -> DebugInfo' lab
DebugInfoCompositeType :: DICompositeType' lab -> DebugInfo' lab
DebugInfoDerivedType :: DIDerivedType' lab -> DebugInfo' lab

-- | The <a>Bool</a> field represents <tt>isUnsigned</tt>, introduced in
--   LLVM 7.
DebugInfoEnumerator :: String -> !Integer -> Bool -> DebugInfo' lab
DebugInfoExpression :: DIExpression -> DebugInfo' lab
DebugInfoFile :: DIFile -> DebugInfo' lab
DebugInfoGlobalVariable :: DIGlobalVariable' lab -> DebugInfo' lab
DebugInfoGlobalVariableExpression :: DIGlobalVariableExpression' lab -> DebugInfo' lab
DebugInfoLexicalBlock :: DILexicalBlock' lab -> DebugInfo' lab
DebugInfoLexicalBlockFile :: DILexicalBlockFile' lab -> DebugInfo' lab
DebugInfoLocalVariable :: DILocalVariable' lab -> DebugInfo' lab
DebugInfoSubprogram :: DISubprogram' lab -> DebugInfo' lab
DebugInfoSubrange :: DISubrange' lab -> DebugInfo' lab
DebugInfoSubroutineType :: DISubroutineType' lab -> DebugInfo' lab
DebugInfoNameSpace :: DINameSpace' lab -> DebugInfo' lab
DebugInfoTemplateTypeParameter :: DITemplateTypeParameter' lab -> DebugInfo' lab
DebugInfoTemplateValueParameter :: DITemplateValueParameter' lab -> DebugInfo' lab
DebugInfoImportedEntity :: DIImportedEntity' lab -> DebugInfo' lab
DebugInfoLabel :: DILabel' lab -> DebugInfo' lab
DebugInfoArgList :: DIArgList' lab -> DebugInfo' lab

-- | Introduced in LLVM 17.
DebugInfoAssignID :: DebugInfo' lab
type DebugInfo = DebugInfo' BlockLabel
type DILabel = DILabel' BlockLabel
data DILabel' lab
DILabel :: Maybe (ValMd' lab) -> String -> Maybe (ValMd' lab) -> Word32 -> DILabel' lab
[dilScope] :: DILabel' lab -> Maybe (ValMd' lab)
[dilName] :: DILabel' lab -> String
[dilFile] :: DILabel' lab -> Maybe (ValMd' lab)
[dilLine] :: DILabel' lab -> Word32
type DIImportedEntity = DIImportedEntity' BlockLabel
data DIImportedEntity' lab
DIImportedEntity :: DwarfTag -> Maybe (ValMd' lab) -> Maybe (ValMd' lab) -> Maybe (ValMd' lab) -> Word32 -> Maybe String -> DIImportedEntity' lab
[diieTag] :: DIImportedEntity' lab -> DwarfTag
[diieScope] :: DIImportedEntity' lab -> Maybe (ValMd' lab)
[diieEntity] :: DIImportedEntity' lab -> Maybe (ValMd' lab)
[diieFile] :: DIImportedEntity' lab -> Maybe (ValMd' lab)
[diieLine] :: DIImportedEntity' lab -> Word32
[diieName] :: DIImportedEntity' lab -> Maybe String
type DITemplateTypeParameter = DITemplateTypeParameter' BlockLabel
data DITemplateTypeParameter' lab
DITemplateTypeParameter :: Maybe String -> Maybe (ValMd' lab) -> Maybe Bool -> DITemplateTypeParameter' lab
[dittpName] :: DITemplateTypeParameter' lab -> Maybe String
[dittpType] :: DITemplateTypeParameter' lab -> Maybe (ValMd' lab)
[dittpIsDefault] :: DITemplateTypeParameter' lab -> Maybe Bool
type DITemplateValueParameter = DITemplateValueParameter' BlockLabel
data DITemplateValueParameter' lab
DITemplateValueParameter :: DwarfTag -> Maybe String -> Maybe (ValMd' lab) -> Maybe Bool -> ValMd' lab -> DITemplateValueParameter' lab
[ditvpTag] :: DITemplateValueParameter' lab -> DwarfTag
[ditvpName] :: DITemplateValueParameter' lab -> Maybe String
[ditvpType] :: DITemplateValueParameter' lab -> Maybe (ValMd' lab)
[ditvpIsDefault] :: DITemplateValueParameter' lab -> Maybe Bool
[ditvpValue] :: DITemplateValueParameter' lab -> ValMd' lab
type DINameSpace = DINameSpace' BlockLabel
data DINameSpace' lab
DINameSpace :: Maybe String -> ValMd' lab -> ValMd' lab -> Word32 -> DINameSpace' lab
[dinsName] :: DINameSpace' lab -> Maybe String
[dinsScope] :: DINameSpace' lab -> ValMd' lab
[dinsFile] :: DINameSpace' lab -> ValMd' lab
[dinsLine] :: DINameSpace' lab -> Word32
type DwarfAttrEncoding = Word16
type DwarfLang = Word16
type DwarfTag = Word16
type DwarfVirtuality = Word8
type DIFlags = Word32
type DIEmissionKind = Word8
data DIBasicType
DIBasicType :: DwarfTag -> String -> Word64 -> Word64 -> DwarfAttrEncoding -> Maybe DIFlags -> DIBasicType
[dibtTag] :: DIBasicType -> DwarfTag
[dibtName] :: DIBasicType -> String
[dibtSize] :: DIBasicType -> Word64
[dibtAlign] :: DIBasicType -> Word64
[dibtEncoding] :: DIBasicType -> DwarfAttrEncoding
[dibtFlags] :: DIBasicType -> Maybe DIFlags
data DICompileUnit' lab
DICompileUnit :: DwarfLang -> Maybe (ValMd' lab) -> Maybe String -> Bool -> Maybe String -> Word16 -> Maybe FilePath -> DIEmissionKind -> Maybe (ValMd' lab) -> Maybe (ValMd' lab) -> Maybe (ValMd' lab) -> Maybe (ValMd' lab) -> Maybe (ValMd' lab) -> Maybe (ValMd' lab) -> Word64 -> Bool -> Bool -> Word64 -> Bool -> Maybe String -> Maybe String -> DICompileUnit' lab
[dicuLanguage] :: DICompileUnit' lab -> DwarfLang
[dicuFile] :: DICompileUnit' lab -> Maybe (ValMd' lab)
[dicuProducer] :: DICompileUnit' lab -> Maybe String
[dicuIsOptimized] :: DICompileUnit' lab -> Bool
[dicuFlags] :: DICompileUnit' lab -> Maybe String
[dicuRuntimeVersion] :: DICompileUnit' lab -> Word16
[dicuSplitDebugFilename] :: DICompileUnit' lab -> Maybe FilePath
[dicuEmissionKind] :: DICompileUnit' lab -> DIEmissionKind
[dicuEnums] :: DICompileUnit' lab -> Maybe (ValMd' lab)
[dicuRetainedTypes] :: DICompileUnit' lab -> Maybe (ValMd' lab)
[dicuSubprograms] :: DICompileUnit' lab -> Maybe (ValMd' lab)
[dicuGlobals] :: DICompileUnit' lab -> Maybe (ValMd' lab)
[dicuImports] :: DICompileUnit' lab -> Maybe (ValMd' lab)
[dicuMacros] :: DICompileUnit' lab -> Maybe (ValMd' lab)
[dicuDWOId] :: DICompileUnit' lab -> Word64
[dicuSplitDebugInlining] :: DICompileUnit' lab -> Bool
[dicuDebugInfoForProf] :: DICompileUnit' lab -> Bool
[dicuNameTableKind] :: DICompileUnit' lab -> Word64
[dicuRangesBaseAddress] :: DICompileUnit' lab -> Bool
[dicuSysRoot] :: DICompileUnit' lab -> Maybe String
[dicuSDK] :: DICompileUnit' lab -> Maybe String
type DICompileUnit = DICompileUnit' BlockLabel
data DICompositeType' lab
DICompositeType :: DwarfTag -> Maybe String -> Maybe (ValMd' lab) -> Word32 -> Maybe (ValMd' lab) -> Maybe (ValMd' lab) -> Word64 -> Word64 -> Word64 -> DIFlags -> Maybe (ValMd' lab) -> DwarfLang -> Maybe (ValMd' lab) -> Maybe (ValMd' lab) -> Maybe String -> Maybe (ValMd' lab) -> Maybe (ValMd' lab) -> Maybe (ValMd' lab) -> Maybe (ValMd' lab) -> Maybe (ValMd' lab) -> Maybe (ValMd' lab) -> DICompositeType' lab
[dictTag] :: DICompositeType' lab -> DwarfTag
[dictName] :: DICompositeType' lab -> Maybe String
[dictFile] :: DICompositeType' lab -> Maybe (ValMd' lab)
[dictLine] :: DICompositeType' lab -> Word32
[dictScope] :: DICompositeType' lab -> Maybe (ValMd' lab)
[dictBaseType] :: DICompositeType' lab -> Maybe (ValMd' lab)
[dictSize] :: DICompositeType' lab -> Word64
[dictAlign] :: DICompositeType' lab -> Word64
[dictOffset] :: DICompositeType' lab -> Word64
[dictFlags] :: DICompositeType' lab -> DIFlags
[dictElements] :: DICompositeType' lab -> Maybe (ValMd' lab)
[dictRuntimeLang] :: DICompositeType' lab -> DwarfLang
[dictVTableHolder] :: DICompositeType' lab -> Maybe (ValMd' lab)
[dictTemplateParams] :: DICompositeType' lab -> Maybe (ValMd' lab)
[dictIdentifier] :: DICompositeType' lab -> Maybe String
[dictDiscriminator] :: DICompositeType' lab -> Maybe (ValMd' lab)
[dictDataLocation] :: DICompositeType' lab -> Maybe (ValMd' lab)
[dictAssociated] :: DICompositeType' lab -> Maybe (ValMd' lab)
[dictAllocated] :: DICompositeType' lab -> Maybe (ValMd' lab)
[dictRank] :: DICompositeType' lab -> Maybe (ValMd' lab)

-- | Introduced in LLVM 14.
[dictAnnotations] :: DICompositeType' lab -> Maybe (ValMd' lab)
type DICompositeType = DICompositeType' BlockLabel
data DIDerivedType' lab
DIDerivedType :: DwarfTag -> Maybe String -> Maybe (ValMd' lab) -> Word32 -> Maybe (ValMd' lab) -> Maybe (ValMd' lab) -> Word64 -> Word64 -> Word64 -> DIFlags -> Maybe (ValMd' lab) -> Maybe Word32 -> Maybe (ValMd' lab) -> DIDerivedType' lab
[didtTag] :: DIDerivedType' lab -> DwarfTag
[didtName] :: DIDerivedType' lab -> Maybe String
[didtFile] :: DIDerivedType' lab -> Maybe (ValMd' lab)
[didtLine] :: DIDerivedType' lab -> Word32
[didtScope] :: DIDerivedType' lab -> Maybe (ValMd' lab)
[didtBaseType] :: DIDerivedType' lab -> Maybe (ValMd' lab)
[didtSize] :: DIDerivedType' lab -> Word64
[didtAlign] :: DIDerivedType' lab -> Word64
[didtOffset] :: DIDerivedType' lab -> Word64
[didtFlags] :: DIDerivedType' lab -> DIFlags
[didtExtraData] :: DIDerivedType' lab -> Maybe (ValMd' lab)

-- | Introduced in LLVM 5.
--   
--   The <a>Maybe</a> encodes the possibility that there is no associated
--   address space (in LLVM, the sentinel value <tt>0</tt> is used for
--   this).
[didtDwarfAddressSpace] :: DIDerivedType' lab -> Maybe Word32

-- | Introduced in LLVM 14
[didtAnnotations] :: DIDerivedType' lab -> Maybe (ValMd' lab)
type DIDerivedType = DIDerivedType' BlockLabel
data DIExpression
DIExpression :: [Word64] -> DIExpression
[dieElements] :: DIExpression -> [Word64]
data DIFile
DIFile :: FilePath -> FilePath -> DIFile
[difFilename] :: DIFile -> FilePath
[difDirectory] :: DIFile -> FilePath
data DIGlobalVariable' lab
DIGlobalVariable :: Maybe (ValMd' lab) -> Maybe String -> Maybe String -> Maybe (ValMd' lab) -> Word32 -> Maybe (ValMd' lab) -> Bool -> Bool -> Maybe (ValMd' lab) -> Maybe (ValMd' lab) -> Maybe Word32 -> Maybe (ValMd' lab) -> DIGlobalVariable' lab
[digvScope] :: DIGlobalVariable' lab -> Maybe (ValMd' lab)
[digvName] :: DIGlobalVariable' lab -> Maybe String
[digvLinkageName] :: DIGlobalVariable' lab -> Maybe String
[digvFile] :: DIGlobalVariable' lab -> Maybe (ValMd' lab)
[digvLine] :: DIGlobalVariable' lab -> Word32
[digvType] :: DIGlobalVariable' lab -> Maybe (ValMd' lab)
[digvIsLocal] :: DIGlobalVariable' lab -> Bool
[digvIsDefinition] :: DIGlobalVariable' lab -> Bool
[digvVariable] :: DIGlobalVariable' lab -> Maybe (ValMd' lab)
[digvDeclaration] :: DIGlobalVariable' lab -> Maybe (ValMd' lab)
[digvAlignment] :: DIGlobalVariable' lab -> Maybe Word32

-- | Introduced in LLVM 14.
[digvAnnotations] :: DIGlobalVariable' lab -> Maybe (ValMd' lab)
type DIGlobalVariable = DIGlobalVariable' BlockLabel
data DIGlobalVariableExpression' lab
DIGlobalVariableExpression :: Maybe (ValMd' lab) -> Maybe (ValMd' lab) -> DIGlobalVariableExpression' lab
[digveVariable] :: DIGlobalVariableExpression' lab -> Maybe (ValMd' lab)
[digveExpression] :: DIGlobalVariableExpression' lab -> Maybe (ValMd' lab)
type DIGlobalVariableExpression = DIGlobalVariableExpression' BlockLabel
data DILexicalBlock' lab
DILexicalBlock :: Maybe (ValMd' lab) -> Maybe (ValMd' lab) -> Word32 -> Word16 -> DILexicalBlock' lab
[dilbScope] :: DILexicalBlock' lab -> Maybe (ValMd' lab)
[dilbFile] :: DILexicalBlock' lab -> Maybe (ValMd' lab)
[dilbLine] :: DILexicalBlock' lab -> Word32
[dilbColumn] :: DILexicalBlock' lab -> Word16
type DILexicalBlock = DILexicalBlock' BlockLabel
data DILexicalBlockFile' lab
DILexicalBlockFile :: ValMd' lab -> Maybe (ValMd' lab) -> Word32 -> DILexicalBlockFile' lab
[dilbfScope] :: DILexicalBlockFile' lab -> ValMd' lab
[dilbfFile] :: DILexicalBlockFile' lab -> Maybe (ValMd' lab)
[dilbfDiscriminator] :: DILexicalBlockFile' lab -> Word32
type DILexicalBlockFile = DILexicalBlockFile' BlockLabel
data DILocalVariable' lab
DILocalVariable :: Maybe (ValMd' lab) -> Maybe String -> Maybe (ValMd' lab) -> Word32 -> Maybe (ValMd' lab) -> Word16 -> DIFlags -> Maybe Word32 -> Maybe (ValMd' lab) -> DILocalVariable' lab
[dilvScope] :: DILocalVariable' lab -> Maybe (ValMd' lab)
[dilvName] :: DILocalVariable' lab -> Maybe String
[dilvFile] :: DILocalVariable' lab -> Maybe (ValMd' lab)
[dilvLine] :: DILocalVariable' lab -> Word32
[dilvType] :: DILocalVariable' lab -> Maybe (ValMd' lab)
[dilvArg] :: DILocalVariable' lab -> Word16
[dilvFlags] :: DILocalVariable' lab -> DIFlags

-- | Introduced in LLVM 4.
[dilvAlignment] :: DILocalVariable' lab -> Maybe Word32

-- | Introduced in LLVM 14.
[dilvAnnotations] :: DILocalVariable' lab -> Maybe (ValMd' lab)
type DILocalVariable = DILocalVariable' BlockLabel
data DISubprogram' lab
DISubprogram :: Maybe (ValMd' lab) -> Maybe String -> Maybe String -> Maybe (ValMd' lab) -> Word32 -> Maybe (ValMd' lab) -> Bool -> Bool -> Word32 -> Maybe (ValMd' lab) -> DwarfVirtuality -> Word32 -> Int64 -> DIFlags -> Bool -> Maybe (ValMd' lab) -> Maybe (ValMd' lab) -> Maybe (ValMd' lab) -> Maybe (ValMd' lab) -> Maybe (ValMd' lab) -> Maybe (ValMd' lab) -> DISubprogram' lab
[dispScope] :: DISubprogram' lab -> Maybe (ValMd' lab)
[dispName] :: DISubprogram' lab -> Maybe String
[dispLinkageName] :: DISubprogram' lab -> Maybe String
[dispFile] :: DISubprogram' lab -> Maybe (ValMd' lab)
[dispLine] :: DISubprogram' lab -> Word32
[dispType] :: DISubprogram' lab -> Maybe (ValMd' lab)
[dispIsLocal] :: DISubprogram' lab -> Bool
[dispIsDefinition] :: DISubprogram' lab -> Bool
[dispScopeLine] :: DISubprogram' lab -> Word32
[dispContainingType] :: DISubprogram' lab -> Maybe (ValMd' lab)
[dispVirtuality] :: DISubprogram' lab -> DwarfVirtuality
[dispVirtualIndex] :: DISubprogram' lab -> Word32
[dispThisAdjustment] :: DISubprogram' lab -> Int64
[dispFlags] :: DISubprogram' lab -> DIFlags
[dispIsOptimized] :: DISubprogram' lab -> Bool
[dispUnit] :: DISubprogram' lab -> Maybe (ValMd' lab)
[dispTemplateParams] :: DISubprogram' lab -> Maybe (ValMd' lab)
[dispDeclaration] :: DISubprogram' lab -> Maybe (ValMd' lab)
[dispRetainedNodes] :: DISubprogram' lab -> Maybe (ValMd' lab)
[dispThrownTypes] :: DISubprogram' lab -> Maybe (ValMd' lab)

-- | Introduced in LLVM 14.
[dispAnnotations] :: DISubprogram' lab -> Maybe (ValMd' lab)
type DISubprogram = DISubprogram' BlockLabel

-- | The DISubrange is a Value subrange specification, usually associated
--   with arrays or enumerations.
--   
--   <ul>
--   <li>Early LLVM: only <a>disrCount</a> and <a>disrLowerBound</a> were
--   present, where both were a direct signed 64-bit value. This
--   corresponds to "format 0" in the bitcode encoding (see reference
--   below).</li>
--   <li>LLVM 7: <a>disrCount</a> changed to metadata representation
--   (<a>ValMd</a>). The metadata representation should only be a signed
--   64-bit integer, a Variable, or an Expression. This corresponds to
--   "format 1" in the bitcode encoding.</li>
--   <li>LLVM 11: <a>disrLowerBound</a> was changed to a metadata
--   representation and <a>disrUpperBound</a> and <a>disrStride</a> were
--   added (primarily driven by the addition of Fortran support in llvm).
--   All three should only be represented as a signed 64-bit integer, a
--   Variable, or an Expression. This corresponds to "format 2" in the
--   bitcode encoding. See
--   <a>https://github.com/llvm/llvm-project/commit/d20bf5a</a> for this
--   change.</li>
--   </ul>
--   
--   Also see
--   <a>https://github.com/llvm/llvm-project/blob/bbe8cd1/llvm/lib/Bitcode/Reader/MetadataLoader.cpp#L1435-L1461</a>
--   for how this is read from the bitcode encoding and the use of the
--   format values mentioned above.
data DISubrange' lab
DISubrange :: Maybe (ValMd' lab) -> Maybe (ValMd' lab) -> Maybe (ValMd' lab) -> Maybe (ValMd' lab) -> DISubrange' lab
[disrCount] :: DISubrange' lab -> Maybe (ValMd' lab)
[disrLowerBound] :: DISubrange' lab -> Maybe (ValMd' lab)
[disrUpperBound] :: DISubrange' lab -> Maybe (ValMd' lab)
[disrStride] :: DISubrange' lab -> Maybe (ValMd' lab)
type DISubrange = DISubrange' BlockLabel
data DISubroutineType' lab
DISubroutineType :: DIFlags -> Maybe (ValMd' lab) -> DISubroutineType' lab
[distFlags] :: DISubroutineType' lab -> DIFlags
[distTypeArray] :: DISubroutineType' lab -> Maybe (ValMd' lab)
type DISubroutineType = DISubroutineType' BlockLabel

-- | See
--   <a>https://releases.llvm.org/13.0.0/docs/LangRef.html#diarglist</a>.
newtype DIArgList' lab
DIArgList :: [ValMd' lab] -> DIArgList' lab
[dialArgs] :: DIArgList' lab -> [ValMd' lab]
type DIArgList = DIArgList' BlockLabel
data IndexResult

-- | An invalid use of GEP
Invalid :: IndexResult

-- | A resolved type
HasType :: Type -> IndexResult

-- | Continue, after resolving an alias
Resolve :: Ident -> (Type -> IndexResult) -> IndexResult
isInvalid :: IndexResult -> Bool

-- | Resolves the type of a GEP instruction. Type aliases are resolved
--   using the given function. An invalid use of GEP or one relying on
--   unknown type aliases will return <a>Nothing</a>
resolveGepFull :: (Ident -> Maybe Type) -> Type -> Typed (Value' lab) -> [Typed (Value' lab)] -> Maybe Type

-- | Resolve the type of a GEP instruction. Note that the type produced is
--   the type of the result, not necessarily a pointer.
resolveGep :: Type -> Typed (Value' lab) -> [Typed (Value' lab)] -> IndexResult

-- | Resolve the type of a GEP instruction. This assumes that the input has
--   already been processed as a pointer.
resolveGepBody :: Type -> [Typed (Value' lab)] -> IndexResult
isGepIndex :: Typed (Value' lab) -> Bool
isGepStructIndex :: Typed (Value' lab) -> Maybe Integer
resolveValueIndex :: Type -> [Int32] -> IndexResult
instance GHC.Internal.Data.Data.Data Text.LLVM.AST.ArithOp
instance GHC.Internal.Data.Data.Data Text.LLVM.AST.AtomicOrdering
instance GHC.Internal.Data.Data.Data Text.LLVM.AST.AtomicRWOp
instance GHC.Internal.Data.Data.Data lab => GHC.Internal.Data.Data.Data (Text.LLVM.AST.BasicBlock' lab)
instance GHC.Internal.Data.Data.Data Text.LLVM.AST.BitOp
instance GHC.Internal.Data.Data.Data Text.LLVM.AST.BlockLabel
instance GHC.Internal.Data.Data.Data lab => GHC.Internal.Data.Data.Data (Text.LLVM.AST.Clause' lab)
instance GHC.Internal.Data.Data.Data lab => GHC.Internal.Data.Data.Data (Text.LLVM.AST.ConstExpr' lab)
instance GHC.Internal.Data.Data.Data Text.LLVM.AST.ConvOp
instance GHC.Internal.Data.Data.Data lab => GHC.Internal.Data.Data.Data (Text.LLVM.AST.DIArgList' lab)
instance GHC.Internal.Data.Data.Data Text.LLVM.AST.DIBasicType
instance GHC.Internal.Data.Data.Data lab => GHC.Internal.Data.Data.Data (Text.LLVM.AST.DICompileUnit' lab)
instance GHC.Internal.Data.Data.Data lab => GHC.Internal.Data.Data.Data (Text.LLVM.AST.DICompositeType' lab)
instance GHC.Internal.Data.Data.Data lab => GHC.Internal.Data.Data.Data (Text.LLVM.AST.DIDerivedType' lab)
instance GHC.Internal.Data.Data.Data Text.LLVM.AST.DIExpression
instance GHC.Internal.Data.Data.Data Text.LLVM.AST.DIFile
instance GHC.Internal.Data.Data.Data lab => GHC.Internal.Data.Data.Data (Text.LLVM.AST.DIGlobalVariable' lab)
instance GHC.Internal.Data.Data.Data lab => GHC.Internal.Data.Data.Data (Text.LLVM.AST.DIGlobalVariableExpression' lab)
instance GHC.Internal.Data.Data.Data lab => GHC.Internal.Data.Data.Data (Text.LLVM.AST.DIImportedEntity' lab)
instance GHC.Internal.Data.Data.Data lab => GHC.Internal.Data.Data.Data (Text.LLVM.AST.DILabel' lab)
instance GHC.Internal.Data.Data.Data lab => GHC.Internal.Data.Data.Data (Text.LLVM.AST.DILexicalBlock' lab)
instance GHC.Internal.Data.Data.Data lab => GHC.Internal.Data.Data.Data (Text.LLVM.AST.DILexicalBlockFile' lab)
instance GHC.Internal.Data.Data.Data lab => GHC.Internal.Data.Data.Data (Text.LLVM.AST.DILocalVariable' lab)
instance GHC.Internal.Data.Data.Data lab => GHC.Internal.Data.Data.Data (Text.LLVM.AST.DINameSpace' lab)
instance GHC.Internal.Data.Data.Data lab => GHC.Internal.Data.Data.Data (Text.LLVM.AST.DISubprogram' lab)
instance GHC.Internal.Data.Data.Data lab => GHC.Internal.Data.Data.Data (Text.LLVM.AST.DISubrange' lab)
instance GHC.Internal.Data.Data.Data lab => GHC.Internal.Data.Data.Data (Text.LLVM.AST.DISubroutineType' lab)
instance GHC.Internal.Data.Data.Data lab => GHC.Internal.Data.Data.Data (Text.LLVM.AST.DITemplateTypeParameter' lab)
instance GHC.Internal.Data.Data.Data lab => GHC.Internal.Data.Data.Data (Text.LLVM.AST.DITemplateValueParameter' lab)
instance GHC.Internal.Data.Data.Data lab => GHC.Internal.Data.Data.Data (Text.LLVM.AST.DebugInfo' lab)
instance GHC.Internal.Data.Data.Data lab => GHC.Internal.Data.Data.Data (Text.LLVM.AST.DebugLoc' lab)
instance GHC.Internal.Data.Data.Data Text.LLVM.AST.Declare
instance GHC.Internal.Data.Data.Data Text.LLVM.AST.Define
instance GHC.Internal.Data.Data.Data Text.LLVM.AST.FCmpOp
instance GHC.Internal.Data.Data.Data Text.LLVM.AST.FP80Value
instance GHC.Internal.Data.Data.Data Text.LLVM.AST.FloatType
instance GHC.Internal.Data.Data.Data Text.LLVM.AST.FunAttr
instance GHC.Internal.Data.Data.Data Text.LLVM.AST.FunctionPointerAlignType
instance GHC.Internal.Data.Data.Data Text.LLVM.AST.GC
instance GHC.Internal.Data.Data.Data Text.LLVM.AST.Global
instance GHC.Internal.Data.Data.Data Text.LLVM.AST.GlobalAlias
instance GHC.Internal.Data.Data.Data Text.LLVM.AST.GlobalAttrs
instance GHC.Internal.Data.Data.Data Text.LLVM.AST.ICmpOp
instance GHC.Internal.Data.Data.Data Text.LLVM.AST.Ident
instance GHC.Internal.Data.Data.Data lab => GHC.Internal.Data.Data.Data (Text.LLVM.AST.Instr' lab)
instance GHC.Internal.Data.Data.Data Text.LLVM.AST.LayoutSpec
instance GHC.Internal.Data.Data.Data Text.LLVM.AST.Linkage
instance GHC.Internal.Data.Data.Data Text.LLVM.AST.Mangling
instance GHC.Internal.Data.Data.Data Text.LLVM.AST.Module
instance GHC.Internal.Data.Data.Data Text.LLVM.AST.NamedMd
instance GHC.Internal.Data.Data.Data lab => GHC.Internal.Data.Data.Data (Text.LLVM.AST.NullResult lab)
instance GHC.Internal.Data.Data.Data Text.LLVM.AST.PrimType
instance GHC.Internal.Data.Data.Data Text.LLVM.AST.SelectionKind
instance GHC.Internal.Data.Data.Data lab => GHC.Internal.Data.Data.Data (Text.LLVM.AST.Stmt' lab)
instance GHC.Internal.Data.Data.Data Text.LLVM.AST.Symbol
instance GHC.Internal.Data.Data.Data ident => GHC.Internal.Data.Data.Data (Text.LLVM.AST.Type' ident)
instance GHC.Internal.Data.Data.Data Text.LLVM.AST.TypeDecl
instance GHC.Internal.Data.Data.Data a => GHC.Internal.Data.Data.Data (Text.LLVM.AST.Typed a)
instance GHC.Internal.Data.Data.Data Text.LLVM.AST.UnaryArithOp
instance GHC.Internal.Data.Data.Data Text.LLVM.AST.UnnamedMd
instance GHC.Internal.Data.Data.Data lab => GHC.Internal.Data.Data.Data (Text.LLVM.AST.ValMd' lab)
instance GHC.Internal.Data.Data.Data lab => GHC.Internal.Data.Data.Data (Text.LLVM.AST.Value' lab)
instance GHC.Internal.Data.Data.Data Text.LLVM.AST.Visibility
instance GHC.Internal.Enum.Enum Text.LLVM.AST.AtomicOrdering
instance GHC.Internal.Enum.Enum Text.LLVM.AST.AtomicRWOp
instance GHC.Internal.Enum.Enum Text.LLVM.AST.ConvOp
instance GHC.Internal.Enum.Enum Text.LLVM.AST.FCmpOp
instance GHC.Internal.Enum.Enum Text.LLVM.AST.FloatType
instance GHC.Internal.Enum.Enum Text.LLVM.AST.FunctionPointerAlignType
instance GHC.Internal.Enum.Enum Text.LLVM.AST.ICmpOp
instance GHC.Internal.Enum.Enum Text.LLVM.AST.Linkage
instance GHC.Internal.Enum.Enum Text.LLVM.AST.Mangling
instance GHC.Internal.Enum.Enum Text.LLVM.AST.SelectionKind
instance GHC.Classes.Eq Text.LLVM.AST.ArithOp
instance GHC.Classes.Eq Text.LLVM.AST.AtomicOrdering
instance GHC.Classes.Eq Text.LLVM.AST.AtomicRWOp
instance GHC.Classes.Eq lab => GHC.Classes.Eq (Text.LLVM.AST.BasicBlock' lab)
instance GHC.Classes.Eq Text.LLVM.AST.BitOp
instance GHC.Classes.Eq Text.LLVM.AST.BlockLabel
instance GHC.Classes.Eq lab => GHC.Classes.Eq (Text.LLVM.AST.Clause' lab)
instance GHC.Classes.Eq lab => GHC.Classes.Eq (Text.LLVM.AST.ConstExpr' lab)
instance GHC.Classes.Eq Text.LLVM.AST.ConvOp
instance GHC.Classes.Eq lab => GHC.Classes.Eq (Text.LLVM.AST.DIArgList' lab)
instance GHC.Classes.Eq Text.LLVM.AST.DIBasicType
instance GHC.Classes.Eq lab => GHC.Classes.Eq (Text.LLVM.AST.DICompileUnit' lab)
instance GHC.Classes.Eq lab => GHC.Classes.Eq (Text.LLVM.AST.DICompositeType' lab)
instance GHC.Classes.Eq lab => GHC.Classes.Eq (Text.LLVM.AST.DIDerivedType' lab)
instance GHC.Classes.Eq Text.LLVM.AST.DIExpression
instance GHC.Classes.Eq Text.LLVM.AST.DIFile
instance GHC.Classes.Eq lab => GHC.Classes.Eq (Text.LLVM.AST.DIGlobalVariable' lab)
instance GHC.Classes.Eq lab => GHC.Classes.Eq (Text.LLVM.AST.DIGlobalVariableExpression' lab)
instance GHC.Classes.Eq lab => GHC.Classes.Eq (Text.LLVM.AST.DIImportedEntity' lab)
instance GHC.Classes.Eq lab => GHC.Classes.Eq (Text.LLVM.AST.DILabel' lab)
instance GHC.Classes.Eq lab => GHC.Classes.Eq (Text.LLVM.AST.DILexicalBlock' lab)
instance GHC.Classes.Eq lab => GHC.Classes.Eq (Text.LLVM.AST.DILexicalBlockFile' lab)
instance GHC.Classes.Eq lab => GHC.Classes.Eq (Text.LLVM.AST.DILocalVariable' lab)
instance GHC.Classes.Eq lab => GHC.Classes.Eq (Text.LLVM.AST.DINameSpace' lab)
instance GHC.Classes.Eq lab => GHC.Classes.Eq (Text.LLVM.AST.DISubprogram' lab)
instance GHC.Classes.Eq lab => GHC.Classes.Eq (Text.LLVM.AST.DISubrange' lab)
instance GHC.Classes.Eq lab => GHC.Classes.Eq (Text.LLVM.AST.DISubroutineType' lab)
instance GHC.Classes.Eq lab => GHC.Classes.Eq (Text.LLVM.AST.DITemplateTypeParameter' lab)
instance GHC.Classes.Eq lab => GHC.Classes.Eq (Text.LLVM.AST.DITemplateValueParameter' lab)
instance GHC.Classes.Eq lab => GHC.Classes.Eq (Text.LLVM.AST.DebugInfo' lab)
instance GHC.Classes.Eq lab => GHC.Classes.Eq (Text.LLVM.AST.DebugLoc' lab)
instance GHC.Classes.Eq Text.LLVM.AST.Declare
instance GHC.Classes.Eq Text.LLVM.AST.Define
instance GHC.Classes.Eq Text.LLVM.AST.FCmpOp
instance GHC.Classes.Eq Text.LLVM.AST.FP80Value
instance GHC.Classes.Eq Text.LLVM.AST.FloatType
instance GHC.Classes.Eq Text.LLVM.AST.FunAttr
instance GHC.Classes.Eq Text.LLVM.AST.FunctionPointerAlignType
instance GHC.Classes.Eq Text.LLVM.AST.GC
instance GHC.Classes.Eq Text.LLVM.AST.Global
instance GHC.Classes.Eq Text.LLVM.AST.GlobalAlias
instance GHC.Classes.Eq Text.LLVM.AST.GlobalAttrs
instance GHC.Classes.Eq Text.LLVM.AST.ICmpOp
instance GHC.Classes.Eq Text.LLVM.AST.Ident
instance GHC.Classes.Eq lab => GHC.Classes.Eq (Text.LLVM.AST.Instr' lab)
instance GHC.Classes.Eq Text.LLVM.AST.LayoutSpec
instance GHC.Classes.Eq Text.LLVM.AST.Linkage
instance GHC.Classes.Eq Text.LLVM.AST.Mangling
instance GHC.Classes.Eq Text.LLVM.AST.Module
instance GHC.Classes.Eq Text.LLVM.AST.NamedMd
instance GHC.Classes.Eq lab => GHC.Classes.Eq (Text.LLVM.AST.NullResult lab)
instance GHC.Classes.Eq Text.LLVM.AST.PrimType
instance GHC.Classes.Eq Text.LLVM.AST.SelectionKind
instance GHC.Classes.Eq lab => GHC.Classes.Eq (Text.LLVM.AST.Stmt' lab)
instance GHC.Classes.Eq Text.LLVM.AST.Symbol
instance GHC.Classes.Eq ident => GHC.Classes.Eq (Text.LLVM.AST.Type' ident)
instance GHC.Classes.Eq Text.LLVM.AST.TypeDecl
instance GHC.Classes.Eq ident => GHC.Classes.Eq (Text.LLVM.AST.TypeView' ident)
instance GHC.Classes.Eq a => GHC.Classes.Eq (Text.LLVM.AST.Typed a)
instance GHC.Classes.Eq Text.LLVM.AST.UnaryArithOp
instance GHC.Classes.Eq Text.LLVM.AST.UnnamedMd
instance GHC.Classes.Eq lab => GHC.Classes.Eq (Text.LLVM.AST.ValMd' lab)
instance GHC.Classes.Eq lab => GHC.Classes.Eq (Text.LLVM.AST.Value' lab)
instance GHC.Classes.Eq Text.LLVM.AST.Visibility
instance GHC.Internal.Data.Foldable.Foldable Text.LLVM.AST.Typed
instance GHC.Internal.Base.Functor Text.LLVM.AST.BasicBlock'
instance GHC.Internal.Base.Functor Text.LLVM.AST.Clause'
instance GHC.Internal.Base.Functor Text.LLVM.AST.ConstExpr'
instance GHC.Internal.Base.Functor Text.LLVM.AST.DIArgList'
instance GHC.Internal.Base.Functor Text.LLVM.AST.DICompileUnit'
instance GHC.Internal.Base.Functor Text.LLVM.AST.DICompositeType'
instance GHC.Internal.Base.Functor Text.LLVM.AST.DIDerivedType'
instance GHC.Internal.Base.Functor Text.LLVM.AST.DIGlobalVariable'
instance GHC.Internal.Base.Functor Text.LLVM.AST.DIGlobalVariableExpression'
instance GHC.Internal.Base.Functor Text.LLVM.AST.DIImportedEntity'
instance GHC.Internal.Base.Functor Text.LLVM.AST.DILabel'
instance GHC.Internal.Base.Functor Text.LLVM.AST.DILexicalBlock'
instance GHC.Internal.Base.Functor Text.LLVM.AST.DILexicalBlockFile'
instance GHC.Internal.Base.Functor Text.LLVM.AST.DILocalVariable'
instance GHC.Internal.Base.Functor Text.LLVM.AST.DINameSpace'
instance GHC.Internal.Base.Functor Text.LLVM.AST.DISubprogram'
instance GHC.Internal.Base.Functor Text.LLVM.AST.DISubrange'
instance GHC.Internal.Base.Functor Text.LLVM.AST.DISubroutineType'
instance GHC.Internal.Base.Functor Text.LLVM.AST.DITemplateTypeParameter'
instance GHC.Internal.Base.Functor Text.LLVM.AST.DITemplateValueParameter'
instance GHC.Internal.Base.Functor Text.LLVM.AST.DebugInfo'
instance GHC.Internal.Base.Functor Text.LLVM.AST.DebugLoc'
instance GHC.Internal.Base.Functor Text.LLVM.AST.Instr'
instance GHC.Internal.Base.Functor Text.LLVM.AST.NullResult
instance GHC.Internal.Base.Functor Text.LLVM.AST.Stmt'
instance GHC.Internal.Base.Functor Text.LLVM.AST.Type'
instance GHC.Internal.Base.Functor Text.LLVM.AST.Typed
instance GHC.Internal.Base.Functor Text.LLVM.AST.ValMd'
instance GHC.Internal.Base.Functor Text.LLVM.AST.Value'
instance GHC.Internal.Generics.Generic1 Text.LLVM.AST.BasicBlock'
instance GHC.Internal.Generics.Generic1 Text.LLVM.AST.Clause'
instance GHC.Internal.Generics.Generic1 Text.LLVM.AST.ConstExpr'
instance GHC.Internal.Generics.Generic1 Text.LLVM.AST.DIArgList'
instance GHC.Internal.Generics.Generic1 Text.LLVM.AST.DICompileUnit'
instance GHC.Internal.Generics.Generic1 Text.LLVM.AST.DICompositeType'
instance GHC.Internal.Generics.Generic1 Text.LLVM.AST.DIDerivedType'
instance GHC.Internal.Generics.Generic1 Text.LLVM.AST.DIGlobalVariable'
instance GHC.Internal.Generics.Generic1 Text.LLVM.AST.DIGlobalVariableExpression'
instance GHC.Internal.Generics.Generic1 Text.LLVM.AST.DIImportedEntity'
instance GHC.Internal.Generics.Generic1 Text.LLVM.AST.DILabel'
instance GHC.Internal.Generics.Generic1 Text.LLVM.AST.DILexicalBlock'
instance GHC.Internal.Generics.Generic1 Text.LLVM.AST.DILexicalBlockFile'
instance GHC.Internal.Generics.Generic1 Text.LLVM.AST.DILocalVariable'
instance GHC.Internal.Generics.Generic1 Text.LLVM.AST.DINameSpace'
instance GHC.Internal.Generics.Generic1 Text.LLVM.AST.DISubprogram'
instance GHC.Internal.Generics.Generic1 Text.LLVM.AST.DISubrange'
instance GHC.Internal.Generics.Generic1 Text.LLVM.AST.DISubroutineType'
instance GHC.Internal.Generics.Generic1 Text.LLVM.AST.DITemplateTypeParameter'
instance GHC.Internal.Generics.Generic1 Text.LLVM.AST.DITemplateValueParameter'
instance GHC.Internal.Generics.Generic1 Text.LLVM.AST.DebugInfo'
instance GHC.Internal.Generics.Generic1 Text.LLVM.AST.DebugLoc'
instance GHC.Internal.Generics.Generic1 Text.LLVM.AST.NullResult
instance GHC.Internal.Generics.Generic1 Text.LLVM.AST.Stmt'
instance GHC.Internal.Generics.Generic1 Text.LLVM.AST.Type'
instance GHC.Internal.Generics.Generic1 Text.LLVM.AST.Typed
instance GHC.Internal.Generics.Generic1 Text.LLVM.AST.ValMd'
instance GHC.Internal.Generics.Generic1 Text.LLVM.AST.Value'
instance GHC.Internal.Generics.Generic Text.LLVM.AST.ArithOp
instance GHC.Internal.Generics.Generic Text.LLVM.AST.AtomicOrdering
instance GHC.Internal.Generics.Generic Text.LLVM.AST.AtomicRWOp
instance GHC.Internal.Generics.Generic (Text.LLVM.AST.BasicBlock' lab)
instance GHC.Internal.Generics.Generic Text.LLVM.AST.BitOp
instance GHC.Internal.Generics.Generic Text.LLVM.AST.BlockLabel
instance GHC.Internal.Generics.Generic (Text.LLVM.AST.Clause' lab)
instance GHC.Internal.Generics.Generic (Text.LLVM.AST.ConstExpr' lab)
instance GHC.Internal.Generics.Generic Text.LLVM.AST.ConvOp
instance GHC.Internal.Generics.Generic (Text.LLVM.AST.DIArgList' lab)
instance GHC.Internal.Generics.Generic Text.LLVM.AST.DIBasicType
instance GHC.Internal.Generics.Generic (Text.LLVM.AST.DICompileUnit' lab)
instance GHC.Internal.Generics.Generic (Text.LLVM.AST.DICompositeType' lab)
instance GHC.Internal.Generics.Generic (Text.LLVM.AST.DIDerivedType' lab)
instance GHC.Internal.Generics.Generic Text.LLVM.AST.DIExpression
instance GHC.Internal.Generics.Generic Text.LLVM.AST.DIFile
instance GHC.Internal.Generics.Generic (Text.LLVM.AST.DIGlobalVariable' lab)
instance GHC.Internal.Generics.Generic (Text.LLVM.AST.DIGlobalVariableExpression' lab)
instance GHC.Internal.Generics.Generic (Text.LLVM.AST.DIImportedEntity' lab)
instance GHC.Internal.Generics.Generic (Text.LLVM.AST.DILabel' lab)
instance GHC.Internal.Generics.Generic (Text.LLVM.AST.DILexicalBlock' lab)
instance GHC.Internal.Generics.Generic (Text.LLVM.AST.DILexicalBlockFile' lab)
instance GHC.Internal.Generics.Generic (Text.LLVM.AST.DILocalVariable' lab)
instance GHC.Internal.Generics.Generic (Text.LLVM.AST.DINameSpace' lab)
instance GHC.Internal.Generics.Generic (Text.LLVM.AST.DISubprogram' lab)
instance GHC.Internal.Generics.Generic (Text.LLVM.AST.DISubrange' lab)
instance GHC.Internal.Generics.Generic (Text.LLVM.AST.DISubroutineType' lab)
instance GHC.Internal.Generics.Generic (Text.LLVM.AST.DITemplateTypeParameter' lab)
instance GHC.Internal.Generics.Generic (Text.LLVM.AST.DITemplateValueParameter' lab)
instance GHC.Internal.Generics.Generic (Text.LLVM.AST.DebugInfo' lab)
instance GHC.Internal.Generics.Generic (Text.LLVM.AST.DebugLoc' lab)
instance GHC.Internal.Generics.Generic Text.LLVM.AST.Declare
instance GHC.Internal.Generics.Generic Text.LLVM.AST.Define
instance GHC.Internal.Generics.Generic Text.LLVM.AST.FCmpOp
instance GHC.Internal.Generics.Generic Text.LLVM.AST.FP80Value
instance GHC.Internal.Generics.Generic Text.LLVM.AST.FloatType
instance GHC.Internal.Generics.Generic Text.LLVM.AST.FunAttr
instance GHC.Internal.Generics.Generic Text.LLVM.AST.FunctionPointerAlignType
instance GHC.Internal.Generics.Generic Text.LLVM.AST.GC
instance GHC.Internal.Generics.Generic Text.LLVM.AST.Global
instance GHC.Internal.Generics.Generic Text.LLVM.AST.GlobalAlias
instance GHC.Internal.Generics.Generic Text.LLVM.AST.GlobalAttrs
instance GHC.Internal.Generics.Generic Text.LLVM.AST.ICmpOp
instance GHC.Internal.Generics.Generic Text.LLVM.AST.Ident
instance GHC.Internal.Generics.Generic Text.LLVM.AST.IndexResult
instance GHC.Internal.Generics.Generic (Text.LLVM.AST.Instr' lab)
instance GHC.Internal.Generics.Generic Text.LLVM.AST.LayoutSpec
instance GHC.Internal.Generics.Generic Text.LLVM.AST.Linkage
instance GHC.Internal.Generics.Generic Text.LLVM.AST.Mangling
instance GHC.Internal.Generics.Generic Text.LLVM.AST.Module
instance GHC.Internal.Generics.Generic Text.LLVM.AST.NamedMd
instance GHC.Internal.Generics.Generic (Text.LLVM.AST.NullResult lab)
instance GHC.Internal.Generics.Generic Text.LLVM.AST.PrimType
instance GHC.Internal.Generics.Generic Text.LLVM.AST.SelectionKind
instance GHC.Internal.Generics.Generic (Text.LLVM.AST.Stmt' lab)
instance GHC.Internal.Generics.Generic Text.LLVM.AST.Symbol
instance GHC.Internal.Generics.Generic (Text.LLVM.AST.Type' ident)
instance GHC.Internal.Generics.Generic Text.LLVM.AST.TypeDecl
instance GHC.Internal.Generics.Generic (Text.LLVM.AST.Typed a)
instance GHC.Internal.Generics.Generic Text.LLVM.AST.UnaryArithOp
instance GHC.Internal.Generics.Generic Text.LLVM.AST.UnnamedMd
instance GHC.Internal.Generics.Generic (Text.LLVM.AST.ValMd' lab)
instance GHC.Internal.Generics.Generic (Text.LLVM.AST.Value' lab)
instance GHC.Internal.Generics.Generic Text.LLVM.AST.Visibility
instance GHC.Internal.Data.String.IsString Text.LLVM.AST.BlockLabel
instance GHC.Internal.Data.String.IsString Text.LLVM.AST.Ident
instance GHC.Internal.Data.String.IsString Text.LLVM.AST.Symbol
instance Language.Haskell.TH.Syntax.Lift Text.LLVM.AST.FloatType
instance Language.Haskell.TH.Syntax.Lift Text.LLVM.AST.Ident
instance Language.Haskell.TH.Syntax.Lift Text.LLVM.AST.PrimType
instance Language.Haskell.TH.Syntax.Lift Text.LLVM.AST.Symbol
instance GHC.Internal.Base.Monoid Text.LLVM.AST.Module
instance GHC.Internal.Base.Monoid Text.LLVM.AST.Symbol
instance GHC.Classes.Ord Text.LLVM.AST.ArithOp
instance GHC.Classes.Ord Text.LLVM.AST.AtomicOrdering
instance GHC.Classes.Ord Text.LLVM.AST.AtomicRWOp
instance GHC.Classes.Ord lab => GHC.Classes.Ord (Text.LLVM.AST.BasicBlock' lab)
instance GHC.Classes.Ord Text.LLVM.AST.BitOp
instance GHC.Classes.Ord Text.LLVM.AST.BlockLabel
instance GHC.Classes.Ord lab => GHC.Classes.Ord (Text.LLVM.AST.Clause' lab)
instance GHC.Classes.Ord lab => GHC.Classes.Ord (Text.LLVM.AST.ConstExpr' lab)
instance GHC.Classes.Ord Text.LLVM.AST.ConvOp
instance GHC.Classes.Ord lab => GHC.Classes.Ord (Text.LLVM.AST.DIArgList' lab)
instance GHC.Classes.Ord Text.LLVM.AST.DIBasicType
instance GHC.Classes.Ord lab => GHC.Classes.Ord (Text.LLVM.AST.DICompileUnit' lab)
instance GHC.Classes.Ord lab => GHC.Classes.Ord (Text.LLVM.AST.DICompositeType' lab)
instance GHC.Classes.Ord lab => GHC.Classes.Ord (Text.LLVM.AST.DIDerivedType' lab)
instance GHC.Classes.Ord Text.LLVM.AST.DIExpression
instance GHC.Classes.Ord Text.LLVM.AST.DIFile
instance GHC.Classes.Ord lab => GHC.Classes.Ord (Text.LLVM.AST.DIGlobalVariable' lab)
instance GHC.Classes.Ord lab => GHC.Classes.Ord (Text.LLVM.AST.DIGlobalVariableExpression' lab)
instance GHC.Classes.Ord lab => GHC.Classes.Ord (Text.LLVM.AST.DIImportedEntity' lab)
instance GHC.Classes.Ord lab => GHC.Classes.Ord (Text.LLVM.AST.DILabel' lab)
instance GHC.Classes.Ord lab => GHC.Classes.Ord (Text.LLVM.AST.DILexicalBlock' lab)
instance GHC.Classes.Ord lab => GHC.Classes.Ord (Text.LLVM.AST.DILexicalBlockFile' lab)
instance GHC.Classes.Ord lab => GHC.Classes.Ord (Text.LLVM.AST.DILocalVariable' lab)
instance GHC.Classes.Ord lab => GHC.Classes.Ord (Text.LLVM.AST.DINameSpace' lab)
instance GHC.Classes.Ord lab => GHC.Classes.Ord (Text.LLVM.AST.DISubprogram' lab)
instance GHC.Classes.Ord lab => GHC.Classes.Ord (Text.LLVM.AST.DISubrange' lab)
instance GHC.Classes.Ord lab => GHC.Classes.Ord (Text.LLVM.AST.DISubroutineType' lab)
instance GHC.Classes.Ord lab => GHC.Classes.Ord (Text.LLVM.AST.DITemplateTypeParameter' lab)
instance GHC.Classes.Ord lab => GHC.Classes.Ord (Text.LLVM.AST.DITemplateValueParameter' lab)
instance GHC.Classes.Ord lab => GHC.Classes.Ord (Text.LLVM.AST.DebugInfo' lab)
instance GHC.Classes.Ord lab => GHC.Classes.Ord (Text.LLVM.AST.DebugLoc' lab)
instance GHC.Classes.Ord Text.LLVM.AST.Declare
instance GHC.Classes.Ord Text.LLVM.AST.Define
instance GHC.Classes.Ord Text.LLVM.AST.FCmpOp
instance GHC.Classes.Ord Text.LLVM.AST.FP80Value
instance GHC.Classes.Ord Text.LLVM.AST.FloatType
instance GHC.Classes.Ord Text.LLVM.AST.FunAttr
instance GHC.Classes.Ord Text.LLVM.AST.FunctionPointerAlignType
instance GHC.Classes.Ord Text.LLVM.AST.GC
instance GHC.Classes.Ord Text.LLVM.AST.Global
instance GHC.Classes.Ord Text.LLVM.AST.GlobalAlias
instance GHC.Classes.Ord Text.LLVM.AST.GlobalAttrs
instance GHC.Classes.Ord Text.LLVM.AST.ICmpOp
instance GHC.Classes.Ord Text.LLVM.AST.Ident
instance GHC.Classes.Ord lab => GHC.Classes.Ord (Text.LLVM.AST.Instr' lab)
instance GHC.Classes.Ord Text.LLVM.AST.LayoutSpec
instance GHC.Classes.Ord Text.LLVM.AST.Linkage
instance GHC.Classes.Ord Text.LLVM.AST.Mangling
instance GHC.Classes.Ord Text.LLVM.AST.Module
instance GHC.Classes.Ord Text.LLVM.AST.NamedMd
instance GHC.Classes.Ord lab => GHC.Classes.Ord (Text.LLVM.AST.NullResult lab)
instance GHC.Classes.Ord Text.LLVM.AST.PrimType
instance GHC.Classes.Ord Text.LLVM.AST.SelectionKind
instance GHC.Classes.Ord lab => GHC.Classes.Ord (Text.LLVM.AST.Stmt' lab)
instance GHC.Classes.Ord Text.LLVM.AST.Symbol
instance GHC.Classes.Ord ident => GHC.Classes.Ord (Text.LLVM.AST.Type' ident)
instance GHC.Classes.Ord Text.LLVM.AST.TypeDecl
instance GHC.Classes.Ord ident => GHC.Classes.Ord (Text.LLVM.AST.TypeView' ident)
instance GHC.Classes.Ord a => GHC.Classes.Ord (Text.LLVM.AST.Typed a)
instance GHC.Classes.Ord Text.LLVM.AST.UnaryArithOp
instance GHC.Classes.Ord Text.LLVM.AST.UnnamedMd
instance GHC.Classes.Ord lab => GHC.Classes.Ord (Text.LLVM.AST.ValMd' lab)
instance GHC.Classes.Ord lab => GHC.Classes.Ord (Text.LLVM.AST.Value' lab)
instance GHC.Classes.Ord Text.LLVM.AST.Visibility
instance GHC.Internal.Base.Semigroup Text.LLVM.AST.Module
instance GHC.Internal.Base.Semigroup Text.LLVM.AST.Symbol
instance GHC.Internal.Show.Show Text.LLVM.AST.ArithOp
instance GHC.Internal.Show.Show Text.LLVM.AST.AtomicOrdering
instance GHC.Internal.Show.Show Text.LLVM.AST.AtomicRWOp
instance GHC.Internal.Show.Show lab => GHC.Internal.Show.Show (Text.LLVM.AST.BasicBlock' lab)
instance GHC.Internal.Show.Show Text.LLVM.AST.BitOp
instance GHC.Internal.Show.Show Text.LLVM.AST.BlockLabel
instance GHC.Internal.Show.Show lab => GHC.Internal.Show.Show (Text.LLVM.AST.Clause' lab)
instance GHC.Internal.Show.Show lab => GHC.Internal.Show.Show (Text.LLVM.AST.ConstExpr' lab)
instance GHC.Internal.Show.Show Text.LLVM.AST.ConvOp
instance GHC.Internal.Show.Show lab => GHC.Internal.Show.Show (Text.LLVM.AST.DIArgList' lab)
instance GHC.Internal.Show.Show Text.LLVM.AST.DIBasicType
instance GHC.Internal.Show.Show lab => GHC.Internal.Show.Show (Text.LLVM.AST.DICompileUnit' lab)
instance GHC.Internal.Show.Show lab => GHC.Internal.Show.Show (Text.LLVM.AST.DICompositeType' lab)
instance GHC.Internal.Show.Show lab => GHC.Internal.Show.Show (Text.LLVM.AST.DIDerivedType' lab)
instance GHC.Internal.Show.Show Text.LLVM.AST.DIExpression
instance GHC.Internal.Show.Show Text.LLVM.AST.DIFile
instance GHC.Internal.Show.Show lab => GHC.Internal.Show.Show (Text.LLVM.AST.DIGlobalVariable' lab)
instance GHC.Internal.Show.Show lab => GHC.Internal.Show.Show (Text.LLVM.AST.DIGlobalVariableExpression' lab)
instance GHC.Internal.Show.Show lab => GHC.Internal.Show.Show (Text.LLVM.AST.DIImportedEntity' lab)
instance GHC.Internal.Show.Show lab => GHC.Internal.Show.Show (Text.LLVM.AST.DILabel' lab)
instance GHC.Internal.Show.Show lab => GHC.Internal.Show.Show (Text.LLVM.AST.DILexicalBlock' lab)
instance GHC.Internal.Show.Show lab => GHC.Internal.Show.Show (Text.LLVM.AST.DILexicalBlockFile' lab)
instance GHC.Internal.Show.Show lab => GHC.Internal.Show.Show (Text.LLVM.AST.DILocalVariable' lab)
instance GHC.Internal.Show.Show lab => GHC.Internal.Show.Show (Text.LLVM.AST.DINameSpace' lab)
instance GHC.Internal.Show.Show lab => GHC.Internal.Show.Show (Text.LLVM.AST.DISubprogram' lab)
instance GHC.Internal.Show.Show lab => GHC.Internal.Show.Show (Text.LLVM.AST.DISubrange' lab)
instance GHC.Internal.Show.Show lab => GHC.Internal.Show.Show (Text.LLVM.AST.DISubroutineType' lab)
instance GHC.Internal.Show.Show lab => GHC.Internal.Show.Show (Text.LLVM.AST.DITemplateTypeParameter' lab)
instance GHC.Internal.Show.Show lab => GHC.Internal.Show.Show (Text.LLVM.AST.DITemplateValueParameter' lab)
instance GHC.Internal.Show.Show lab => GHC.Internal.Show.Show (Text.LLVM.AST.DebugInfo' lab)
instance GHC.Internal.Show.Show lab => GHC.Internal.Show.Show (Text.LLVM.AST.DebugLoc' lab)
instance GHC.Internal.Show.Show Text.LLVM.AST.Declare
instance GHC.Internal.Show.Show Text.LLVM.AST.Define
instance GHC.Internal.Show.Show Text.LLVM.AST.FCmpOp
instance GHC.Internal.Show.Show Text.LLVM.AST.FP80Value
instance GHC.Internal.Show.Show Text.LLVM.AST.FloatType
instance GHC.Internal.Show.Show Text.LLVM.AST.FunAttr
instance GHC.Internal.Show.Show Text.LLVM.AST.FunctionPointerAlignType
instance GHC.Internal.Show.Show Text.LLVM.AST.GC
instance GHC.Internal.Show.Show Text.LLVM.AST.Global
instance GHC.Internal.Show.Show Text.LLVM.AST.GlobalAlias
instance GHC.Internal.Show.Show Text.LLVM.AST.GlobalAttrs
instance GHC.Internal.Show.Show Text.LLVM.AST.ICmpOp
instance GHC.Internal.Show.Show Text.LLVM.AST.Ident
instance GHC.Internal.Show.Show lab => GHC.Internal.Show.Show (Text.LLVM.AST.Instr' lab)
instance GHC.Internal.Show.Show Text.LLVM.AST.LayoutSpec
instance GHC.Internal.Show.Show Text.LLVM.AST.Linkage
instance GHC.Internal.Show.Show Text.LLVM.AST.Mangling
instance GHC.Internal.Show.Show Text.LLVM.AST.Module
instance GHC.Internal.Show.Show Text.LLVM.AST.NamedMd
instance GHC.Internal.Show.Show lab => GHC.Internal.Show.Show (Text.LLVM.AST.NullResult lab)
instance GHC.Internal.Show.Show Text.LLVM.AST.PrimType
instance GHC.Internal.Show.Show Text.LLVM.AST.SelectionKind
instance GHC.Internal.Show.Show lab => GHC.Internal.Show.Show (Text.LLVM.AST.Stmt' lab)
instance GHC.Internal.Show.Show Text.LLVM.AST.Symbol
instance GHC.Internal.Show.Show ident => GHC.Internal.Show.Show (Text.LLVM.AST.Type' ident)
instance GHC.Internal.Show.Show Text.LLVM.AST.TypeDecl
instance GHC.Internal.Show.Show a => GHC.Internal.Show.Show (Text.LLVM.AST.Typed a)
instance GHC.Internal.Show.Show Text.LLVM.AST.UnaryArithOp
instance GHC.Internal.Show.Show Text.LLVM.AST.UnnamedMd
instance GHC.Internal.Show.Show lab => GHC.Internal.Show.Show (Text.LLVM.AST.ValMd' lab)
instance GHC.Internal.Show.Show lab => GHC.Internal.Show.Show (Text.LLVM.AST.Value' lab)
instance GHC.Internal.Show.Show Text.LLVM.AST.Visibility
instance GHC.Internal.Data.Traversable.Traversable Text.LLVM.AST.Typed

module Text.LLVM.Parser
pNameChar :: Parser Char
pHexEscape :: Parser Char
pStringChar :: Parser Char
pName :: Parser String
pIdent :: Parser Ident
pSymbol :: Parser Symbol
pWord32 :: Parser Word32
pWord64 :: Parser Word64
pPrimType :: Parser PrimType
pFloatType :: Parser FloatType
pType :: Parser Type
parseType :: String -> Either ParseError Type
angles :: Parser a -> Parser a
braces :: Parser a -> Parser a
brackets :: Parser a -> Parser a
parens :: Parser a -> Parser a
quotes :: Parser a -> Parser a
spaced :: Parser a -> Parser a

module Text.LLVM.Labels
class Functor f => HasLabel (f :: Type -> Type)

-- | Given a function for resolving labels, where the presence of a symbol
--   denotes a label in a different function, rename all labels in a
--   function.
relabel :: (HasLabel f, Applicative m) => (Maybe Symbol -> a -> m b) -> f a -> m (f b)
instance Text.LLVM.Labels.HasLabel Text.LLVM.AST.Clause'
instance Text.LLVM.Labels.HasLabel Text.LLVM.AST.ConstExpr'
instance Text.LLVM.Labels.HasLabel Text.LLVM.AST.DIArgList'
instance Text.LLVM.Labels.HasLabel Text.LLVM.AST.DICompileUnit'
instance Text.LLVM.Labels.HasLabel Text.LLVM.AST.DICompositeType'
instance Text.LLVM.Labels.HasLabel Text.LLVM.AST.DIDerivedType'
instance Text.LLVM.Labels.HasLabel Text.LLVM.AST.DIGlobalVariable'
instance Text.LLVM.Labels.HasLabel Text.LLVM.AST.DIGlobalVariableExpression'
instance Text.LLVM.Labels.HasLabel Text.LLVM.AST.DIImportedEntity'
instance Text.LLVM.Labels.HasLabel Text.LLVM.AST.DILabel'
instance Text.LLVM.Labels.HasLabel Text.LLVM.AST.DILexicalBlock'
instance Text.LLVM.Labels.HasLabel Text.LLVM.AST.DILexicalBlockFile'
instance Text.LLVM.Labels.HasLabel Text.LLVM.AST.DILocalVariable'
instance Text.LLVM.Labels.HasLabel Text.LLVM.AST.DINameSpace'
instance Text.LLVM.Labels.HasLabel Text.LLVM.AST.DISubprogram'
instance Text.LLVM.Labels.HasLabel Text.LLVM.AST.DISubrange'
instance Text.LLVM.Labels.HasLabel Text.LLVM.AST.DISubroutineType'
instance Text.LLVM.Labels.HasLabel Text.LLVM.AST.DITemplateTypeParameter'
instance Text.LLVM.Labels.HasLabel Text.LLVM.AST.DITemplateValueParameter'
instance Text.LLVM.Labels.HasLabel Text.LLVM.AST.DebugInfo'
instance Text.LLVM.Labels.HasLabel Text.LLVM.AST.DebugLoc'
instance Text.LLVM.Labels.HasLabel Text.LLVM.AST.Instr'
instance Text.LLVM.Labels.HasLabel Text.LLVM.AST.Stmt'
instance Text.LLVM.Labels.HasLabel Text.LLVM.AST.ValMd'
instance Text.LLVM.Labels.HasLabel Text.LLVM.AST.Value'


module Text.LLVM.DebugUtils
data Info
Pointer :: Info -> Info
Structure :: Maybe String -> [StructFieldInfo] -> Info
Union :: Maybe String -> [UnionFieldInfo] -> Info
Typedef :: String -> Info -> Info
ArrInfo :: Info -> Info
BaseType :: String -> DIBasicType -> Info
Unknown :: Info

-- | Record debug information about a field in a struct type.
data StructFieldInfo
StructFieldInfo :: String -> Word64 -> Maybe BitfieldInfo -> Info -> StructFieldInfo

-- | The field name.
[sfiName] :: StructFieldInfo -> String

-- | The field's offset (in bits) from the start of the struct.
[sfiOffset] :: StructFieldInfo -> Word64

-- | If this field resides within a bitfield, this is <tt><a>Just</a>
--   bitfieldInfo</tt>. Otherwise, this is <a>Nothing</a>.
[sfiBitfield] :: StructFieldInfo -> Maybe BitfieldInfo

-- | The debug <a>Info</a> associated with the field's type.
[sfiInfo] :: StructFieldInfo -> Info

-- | Record debug information about a field within a bitfield. For example,
--   the following C struct:
--   
--   <pre>
--   struct s {
--     int32_t w;
--     uint8_t x1:1;
--     uint8_t x2:2;
--     uint8_t y:1;
--     int32_t z;
--   };
--   </pre>
--   
--   Corresponds to the following <a>Info</a>:
--   
--   <pre>
--   <a>Structure</a>
--     [ <a>StructFieldInfo</a> { <a>sfiName</a> = "w"
--                         , <a>sfiOffset</a> = 0
--                         , <a>sfiBitfield</a> = Nothing
--                         , <a>sfiInfo</a> = <a>BaseType</a> "int32_t"
--                         }
--     , <a>StructFieldInfo</a> { <a>sfiName</a> = "x1"
--                         , <a>sfiOffset</a> = 32
--                         , <a>sfiBitfield</a> = Just (<a>BitfieldInfo</a> { <a>biFieldSize</a> = 1
--                                                                , <a>biBitfieldOffset</a> = 32
--                                                                })
--                         , <a>sfiInfo</a> = <a>BaseType</a> "uint8_t"
--                         }
--     , <a>StructFieldInfo</a> { <a>sfiName</a> = "x2"
--                         , <a>sfiOffset</a> = 33
--                         , <a>sfiBitfield</a> = Just (<a>BitfieldInfo</a> { <a>biFieldSize</a> = 2
--                                                                , <a>biBitfieldOffset</a> = 32
--                                                                })
--                         , <a>sfiInfo</a> = BaseType "uint8_t"
--                         }
--     , <a>StructFieldInfo</a> { <a>sfiName</a> = "y"
--                         , <a>sfiOffset</a> = 35
--                         , <a>sfiBitfield</a> = Just (<a>BitfieldInfo</a> { <a>biFieldSize</a> = 1
--                                                                , <a>biBitfieldOffset</a> = 32
--                                                                })
--                         , <a>sfiInfo</a> = <a>BaseType</a> "uint8_t"
--                         }
--     , <a>StructFieldInfo</a> { <a>sfiName</a> = "z"
--                         , <a>sfiOffset</a> = 64
--                         , <a>sfiBitfield</a> = Nothing
--                         , <a>sfiInfo</a> = BaseType "int32_t"
--                         }
--     ]
--   </pre>
--   
--   Notice that only <tt>x1</tt>, <tt>x2</tt>, and <tt>y</tt> have
--   <a>BitfieldInfo</a>s, as they are the only fields that were declared
--   with bitfield syntax.
data BitfieldInfo
BitfieldInfo :: Word64 -> Word64 -> BitfieldInfo

-- | The field's size (in bits) within the bitfield. This should not be
--   confused with the size of the field's declared type. For example, the
--   <a>biFieldSize</a> of the <tt>x1</tt> field is <tt>1</tt>, despite the
--   fact that its declared type, <tt>uint8_t</tt>, is otherwise 8 bits in
--   size.
[biFieldSize] :: BitfieldInfo -> Word64

-- | The bitfield's offset (in bits) from the start of the struct. Note
--   that for a given field within a bitfield, its <a>sfiOffset</a> is
--   equal to the <a>biBitfieldOffset</a> plus the <a>biFieldSize</a>.
[biBitfieldOffset] :: BitfieldInfo -> Word64

-- | Record debug information about a field in a union type.
data UnionFieldInfo
UnionFieldInfo :: String -> Info -> UnionFieldInfo

-- | The field name.
[ufiName] :: UnionFieldInfo -> String

-- | The debug <a>Info</a> associated with the field's type.
[ufiInfo] :: UnionFieldInfo -> Info

-- | Compute the structures of a function's return and argument types using
--   DWARF information metadata of the LLVM module. Different versions of
--   LLVM make this information available via different paths. This
--   function attempts to support the variations.
computeFunctionTypes :: Module -> Symbol -> Maybe [Maybe Info]
valMdToInfo :: MdMap -> ValMd -> Info
localVariableNameDeclarations :: IntMap ValMd -> Define -> Map Ident Ident

-- | Compute an <a>IntMap</a> of the unnamed metadata in a module
mkMdMap :: Module -> IntMap ValMd

-- | If the argument describes a pointer, return the information for the
--   type that it points do. If the argument describes an array, return
--   information about the element type.
derefInfo :: Info -> Info

-- | If the argument describes a composite type, returns the type of the
--   field by zero-based index into the list of fields.
fieldIndexByPosition :: Int -> Info -> Info

-- | If the argument describes a composite type, return the first,
--   zero-based index of the field in that type that matches the given
--   name.
fieldIndexByName :: String -> Info -> Maybe Int

-- | Search the metadata for debug info corresponding to a given type
--   alias. This is considered a heuristic because there's no direct
--   mapping between type aliases and debug info. The debug information
--   must be search for a textual match.
--   
--   Compared to <tt>guessTypeInfo</tt>, this function first tries to strip
--   the "struct." and "union." prefixes that are commonly added by clang
--   before searching for the type information.
guessAliasInfo :: IntMap ValMd -> Ident -> Info

-- | Search the metadata for debug info corresponding to a given type
--   alias. This is considered a heuristic because there's no direct
--   mapping between type aliases and debug info. The debug information
--   must be search for a textual match.
guessTypeInfo :: IntMap ValMd -> String -> Info

-- | Find source-level names of function arguments
debugInfoArgNames :: Module -> Define -> IntMap String

-- | Map global variable names to the line on which the global is defined
debugInfoGlobalLines :: Module -> Map String Int

-- | Map function names to the line on which the function is defined
debugInfoDefineLines :: Module -> Map String Int
instance GHC.Internal.Show.Show Text.LLVM.DebugUtils.BitfieldInfo
instance GHC.Internal.Show.Show Text.LLVM.DebugUtils.Info
instance GHC.Internal.Show.Show Text.LLVM.DebugUtils.StructFieldInfo
instance GHC.Internal.Show.Show Text.LLVM.DebugUtils.UnionFieldInfo

module Text.LLVM
data LLVM a
runLLVM :: LLVM a -> (a, Module)
emitTypeDecl :: TypeDecl -> LLVM ()
emitGlobal :: Global -> LLVM (Typed Value)
emitDeclare :: Declare -> LLVM (Typed Value)
emitDefine :: Define -> LLVM (Typed Value)
alias :: Ident -> Type -> LLVM ()
freshSymbol :: LLVM Symbol
data a :> b
(:>) :: a -> b -> (:>) a b
infixr 0 :>
infixr 0 :>

-- | Define a function.
define :: DefineArgs sig k => FunAttrs -> Type -> Symbol -> sig -> k -> LLVM (Typed Value)

-- | A combination of define and <tt>freshSymbol</tt>.
defineFresh :: DefineArgs sig k => FunAttrs -> Type -> sig -> k -> LLVM (Typed Value)

-- | Types that can be used to define the body of a function.
class DefineArgs a k | a -> k

-- | Function definition when the argument list isn't statically known.
--   This is useful when generating code.
define' :: FunAttrs -> Type -> Symbol -> [Type] -> Bool -> ([Typed Value] -> BB ()) -> LLVM (Typed Value)

-- | Emit a declaration.
declare :: Type -> Symbol -> [Type] -> Bool -> LLVM (Typed Value)

-- | Emit a global declaration.
global :: GlobalAttrs -> Symbol -> Type -> Maybe Value -> LLVM (Typed Value)
data FunAttrs
FunAttrs :: Maybe Linkage -> Maybe Visibility -> Maybe GC -> FunAttrs
[funLinkage] :: FunAttrs -> Maybe Linkage
[funVisibility] :: FunAttrs -> Maybe Visibility
[funGC] :: FunAttrs -> Maybe GC
emptyFunAttrs :: FunAttrs
iT :: Word32 -> Type
ptrT :: Type -> Type
voidT :: Type
arrayT :: Word64 -> Type -> Type
(=:) :: Type -> a -> Typed a
(-:) :: IsValue a => Type -> a -> Typed Value
class IsValue a
toValue :: IsValue a => a -> Value
int :: Int -> Value
integer :: Integer -> Value
struct :: Bool -> [Typed Value] -> Typed Value
array :: Type -> [Value] -> Typed Value

-- | Output a somewhat clunky representation for a string global, that
--   deals well with escaping in the haskell-source string.
string :: Symbol -> String -> LLVM (Typed Value)
data BB a
runBB :: BB a -> (a, [BasicBlock])
freshLabel :: BB Ident

-- | Force termination of the current basic block, and start a new one with
--   the given label. If the previous block had no instructions defined, it
--   will just be thrown away.
label :: Ident -> BB ()
comment :: String -> BB ()

-- | Emit an assignment that uses the given identifier to name the result
--   of the BB operation.
--   
--   WARNING: this can throw errors.
assign :: IsValue a => Ident -> BB (Typed a) -> BB (Typed Value)

-- | Emit the `<tt>ret'</tt> instruction and terminate the current basic
--   block.
ret :: IsValue a => Typed a -> BB ()

-- | Emit ``ret void'' and terminate the current basic block.
retVoid :: BB ()
jump :: Ident -> BB ()
br :: IsValue a => Typed a -> Ident -> Ident -> BB ()
unreachable :: BB ()
unwind :: BB ()
add :: (IsValue a, IsValue b) => Typed a -> b -> BB (Typed Value)
fadd :: (IsValue a, IsValue b) => Typed a -> b -> BB (Typed Value)
sub :: (IsValue a, IsValue b) => Typed a -> b -> BB (Typed Value)
fsub :: (IsValue a, IsValue b) => Typed a -> b -> BB (Typed Value)
mul :: (IsValue a, IsValue b) => Typed a -> b -> BB (Typed Value)
fmul :: (IsValue a, IsValue b) => Typed a -> b -> BB (Typed Value)
udiv :: (IsValue a, IsValue b) => Typed a -> b -> BB (Typed Value)
sdiv :: (IsValue a, IsValue b) => Typed a -> b -> BB (Typed Value)
fdiv :: (IsValue a, IsValue b) => Typed a -> b -> BB (Typed Value)
urem :: (IsValue a, IsValue b) => Typed a -> b -> BB (Typed Value)
srem :: (IsValue a, IsValue b) => Typed a -> b -> BB (Typed Value)
frem :: (IsValue a, IsValue b) => Typed a -> b -> BB (Typed Value)
shl :: (IsValue a, IsValue b) => Typed a -> b -> BB (Typed Value)
lshr :: (IsValue a, IsValue b) => Typed a -> b -> BB (Typed Value)
ashr :: (IsValue a, IsValue b) => Typed a -> b -> BB (Typed Value)
band :: (IsValue a, IsValue b) => Typed a -> b -> BB (Typed Value)
bor :: (IsValue a, IsValue b) => Typed a -> b -> BB (Typed Value)
bxor :: (IsValue a, IsValue b) => Typed a -> b -> BB (Typed Value)
trunc :: IsValue a => Typed a -> Type -> BB (Typed Value)
zext :: IsValue a => Typed a -> Type -> BB (Typed Value)
sext :: IsValue a => Typed a -> Type -> BB (Typed Value)
fptrunc :: IsValue a => Typed a -> Type -> BB (Typed Value)
fpext :: IsValue a => Typed a -> Type -> BB (Typed Value)
fptoui :: IsValue a => Typed a -> Type -> BB (Typed Value)
fptosi :: IsValue a => Typed a -> Type -> BB (Typed Value)
uitofp :: IsValue a => Typed a -> Type -> BB (Typed Value)
sitofp :: IsValue a => Typed a -> Type -> BB (Typed Value)
ptrtoint :: IsValue a => Typed a -> Type -> BB (Typed Value)
inttoptr :: IsValue a => Typed a -> Type -> BB (Typed Value)
bitcast :: IsValue a => Typed a -> Type -> BB (Typed Value)

-- | Returns the value stored in the member field of an aggregate value.
extractValue :: IsValue a => Typed a -> Int32 -> BB (Typed Value)

-- | Inserts a value into the member field of an aggregate value, and
--   returns the new value.
insertValue :: (IsValue a, IsValue b) => Typed a -> Typed b -> Int32 -> BB (Typed Value)
alloca :: Type -> Maybe (Typed Value) -> Maybe Int -> BB (Typed Value)
load :: IsValue a => Type -> Typed a -> Maybe Align -> BB (Typed Value)
store :: (IsValue a, IsValue b) => a -> Typed b -> Maybe Align -> BB ()
getelementptr :: IsValue a => Type -> Typed a -> [Typed Value] -> BB (Typed Value)
nullPtr :: Type -> Typed Value
icmp :: (IsValue a, IsValue b) => ICmpOp -> Typed a -> b -> BB (Typed Value)
fcmp :: (IsValue a, IsValue b) => FCmpOp -> Typed a -> b -> BB (Typed Value)
phi :: Type -> [PhiArg] -> BB (Typed Value)
data PhiArg
from :: IsValue a => a -> BlockLabel -> PhiArg
select :: (IsValue a, IsValue b, IsValue c) => Typed a -> Typed b -> Typed c -> BB (Typed Value)

-- | Emit a call instruction, and generate a new variable for its result.
call :: IsValue a => Typed a -> [Typed Value] -> BB (Typed Value)

-- | Emit a call instruction, but don't generate a new variable for its
--   result.
call_ :: IsValue a => Typed a -> [Typed Value] -> BB ()

-- | Emit an invoke instruction, and generate a new variable for its
--   result.
invoke :: IsValue a => Type -> a -> [Typed Value] -> Ident -> Ident -> BB (Typed Value)

-- | Emit a call instruction, but don't generate a new variable for its
--   result.
switch :: IsValue a => Typed a -> Ident -> [(Integer, Ident)] -> BB ()
shuffleVector :: (IsValue a, IsValue b, IsValue c) => Typed a -> b -> c -> BB (Typed Value)
instance GHC.Internal.Base.Applicative Text.LLVM.BB
instance GHC.Internal.Base.Applicative Text.LLVM.LLVM
instance Text.LLVM.DefineArgs as k => Text.LLVM.DefineArgs (Text.LLVM.AST.Type Text.LLVM.:> as) (Text.LLVM.AST.Typed Text.LLVM.AST.Value -> k)
instance Text.LLVM.DefineArgs (Text.LLVM.AST.Type, Text.LLVM.AST.Type) (Text.LLVM.AST.Typed Text.LLVM.AST.Value -> Text.LLVM.AST.Typed Text.LLVM.AST.Value -> Text.LLVM.BB ())
instance Text.LLVM.DefineArgs (Text.LLVM.AST.Type, Text.LLVM.AST.Type, Text.LLVM.AST.Type) (Text.LLVM.AST.Typed Text.LLVM.AST.Value -> Text.LLVM.AST.Typed Text.LLVM.AST.Value -> Text.LLVM.AST.Typed Text.LLVM.AST.Value -> Text.LLVM.BB ())
instance Text.LLVM.DefineArgs Text.LLVM.AST.Type (Text.LLVM.AST.Typed Text.LLVM.AST.Value -> Text.LLVM.BB ())
instance Text.LLVM.DefineArgs () (Text.LLVM.BB ())
instance GHC.Internal.Base.Functor Text.LLVM.BB
instance GHC.Internal.Base.Functor Text.LLVM.LLVM
instance GHC.Internal.Data.String.IsString (Text.LLVM.BB a)
instance Text.LLVM.IsValue GHC.Types.Bool
instance Text.LLVM.IsValue GHC.Types.Double
instance Text.LLVM.IsValue GHC.Types.Float
instance Text.LLVM.IsValue Text.LLVM.AST.Ident
instance Text.LLVM.IsValue GHC.Types.Int
instance Text.LLVM.IsValue GHC.Internal.Int.Int16
instance Text.LLVM.IsValue GHC.Internal.Int.Int32
instance Text.LLVM.IsValue GHC.Internal.Int.Int64
instance Text.LLVM.IsValue GHC.Internal.Int.Int8
instance Text.LLVM.IsValue GHC.Num.Integer.Integer
instance Text.LLVM.IsValue Text.LLVM.AST.Symbol
instance Text.LLVM.IsValue a => Text.LLVM.IsValue (Text.LLVM.AST.Typed a)
instance Text.LLVM.IsValue Text.LLVM.AST.Value
instance GHC.Internal.Control.Monad.Fix.MonadFix Text.LLVM.BB
instance GHC.Internal.Control.Monad.Fix.MonadFix Text.LLVM.LLVM
instance GHC.Internal.Base.Monad Text.LLVM.BB
instance GHC.Internal.Base.Monad Text.LLVM.LLVM
instance (GHC.Internal.Show.Show a, GHC.Internal.Show.Show b) => GHC.Internal.Show.Show (a Text.LLVM.:> b)
instance GHC.Internal.Show.Show Text.LLVM.FunAttrs
instance GHC.Internal.Show.Show Text.LLVM.RW

module Text.LLVM.Lens
modAliasesLens :: Lens' Module [GlobalAlias]
modComdatLens :: Lens' Module (Map String SelectionKind)
modDataLayoutLens :: Lens' Module DataLayout
modDeclaresLens :: Lens' Module [Declare]
modDefinesLens :: Lens' Module [Define]
modGlobalsLens :: Lens' Module [Global]
modInlineAsmLens :: Lens' Module InlineAsm
modNamedMdLens :: Lens' Module [NamedMd]
modSourceNameLens :: Lens' Module (Maybe String)
modTripleLens :: Lens' Module TargetTriple
modTypesLens :: Lens' Module [TypeDecl]
modUnnamedMdLens :: Lens' Module [UnnamedMd]
typeNameLens :: Lens' TypeDecl Ident
typeValueLens :: Lens' TypeDecl Type
aliasLinkageLens :: Lens' GlobalAlias (Maybe Linkage)
aliasNameLens :: Lens' GlobalAlias Symbol
aliasTargetLens :: Lens' GlobalAlias Value
aliasTypeLens :: Lens' GlobalAlias Type
aliasVisibilityLens :: Lens' GlobalAlias (Maybe Visibility)
nmNameLens :: Lens' NamedMd String
nmValuesLens :: Lens' NamedMd [Int]
umDistinctLens :: Lens' UnnamedMd Bool
umIndexLens :: Lens' UnnamedMd Int
umValuesLens :: Lens' UnnamedMd ValMd
typedTypeLens :: forall a f. Functor f => (Type -> f Type) -> Typed a -> f (Typed a)
typedValueLens :: forall a1 a2 f. Functor f => (a1 -> f a2) -> Typed a1 -> f (Typed a2)
globalAlignLens :: Lens' Global (Maybe Align)
globalAttrsLens :: Lens' Global GlobalAttrs
globalMetadataLens :: Lens' Global GlobalMdAttachments
globalSymLens :: Lens' Global Symbol
globalTypeLens :: Lens' Global Type
globalValueLens :: Lens' Global (Maybe Value)
decArgsLens :: Lens' Declare [Type]
decAttrsLens :: Lens' Declare [FunAttr]
decComdatLens :: Lens' Declare (Maybe String)
decLinkageLens :: Lens' Declare (Maybe Linkage)
decNameLens :: Lens' Declare Symbol
decRetTypeLens :: Lens' Declare Type
decVarArgsLens :: Lens' Declare Bool
decVisibilityLens :: Lens' Declare (Maybe Visibility)
gaConstantLens :: Lens' GlobalAttrs Bool
gaLinkageLens :: Lens' GlobalAttrs (Maybe Linkage)
gaVisibilityLens :: Lens' GlobalAttrs (Maybe Visibility)
bbLabelLens :: forall lab f. Functor f => (Maybe lab -> f (Maybe lab)) -> BasicBlock' lab -> f (BasicBlock' lab)
bbStmtsLens :: forall lab f. Functor f => ([Stmt' lab] -> f [Stmt' lab]) -> BasicBlock' lab -> f (BasicBlock' lab)
dlColLens :: forall lab f. Functor f => (Word32 -> f Word32) -> DebugLoc' lab -> f (DebugLoc' lab)
dlIALens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DebugLoc' lab -> f (DebugLoc' lab)
dlImplicitLens :: forall lab f. Functor f => (Bool -> f Bool) -> DebugLoc' lab -> f (DebugLoc' lab)
dlLineLens :: forall lab f. Functor f => (Word32 -> f Word32) -> DebugLoc' lab -> f (DebugLoc' lab)
dlScopeLens :: forall lab f. Functor f => (ValMd' lab -> f (ValMd' lab)) -> DebugLoc' lab -> f (DebugLoc' lab)
difDirectoryLens :: Lens' DIFile FilePath
difFilenameLens :: Lens' DIFile FilePath
disrCountLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DISubrange' lab -> f (DISubrange' lab)
disrLowerBoundLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DISubrange' lab -> f (DISubrange' lab)
disrStrideLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DISubrange' lab -> f (DISubrange' lab)
disrUpperBoundLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DISubrange' lab -> f (DISubrange' lab)
dibtAlignLens :: Lens' DIBasicType Word64
dibtEncodingLens :: Lens' DIBasicType DwarfAttrEncoding
dibtFlagsLens :: Lens' DIBasicType (Maybe DIFlags)
dibtNameLens :: Lens' DIBasicType String
dibtSizeLens :: Lens' DIBasicType Word64
dibtTagLens :: Lens' DIBasicType DwarfTag
dieElementsLens :: Lens' DIExpression [Word64]
dispAnnotationsLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DISubprogram' lab -> f (DISubprogram' lab)
dispContainingTypeLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DISubprogram' lab -> f (DISubprogram' lab)
dispDeclarationLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DISubprogram' lab -> f (DISubprogram' lab)
dispFileLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DISubprogram' lab -> f (DISubprogram' lab)
dispFlagsLens :: forall lab f. Functor f => (DIFlags -> f DIFlags) -> DISubprogram' lab -> f (DISubprogram' lab)
dispIsDefinitionLens :: forall lab f. Functor f => (Bool -> f Bool) -> DISubprogram' lab -> f (DISubprogram' lab)
dispIsLocalLens :: forall lab f. Functor f => (Bool -> f Bool) -> DISubprogram' lab -> f (DISubprogram' lab)
dispIsOptimizedLens :: forall lab f. Functor f => (Bool -> f Bool) -> DISubprogram' lab -> f (DISubprogram' lab)
dispLineLens :: forall lab f. Functor f => (Word32 -> f Word32) -> DISubprogram' lab -> f (DISubprogram' lab)
dispLinkageNameLens :: forall lab f. Functor f => (Maybe String -> f (Maybe String)) -> DISubprogram' lab -> f (DISubprogram' lab)
dispNameLens :: forall lab f. Functor f => (Maybe String -> f (Maybe String)) -> DISubprogram' lab -> f (DISubprogram' lab)
dispRetainedNodesLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DISubprogram' lab -> f (DISubprogram' lab)
dispScopeLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DISubprogram' lab -> f (DISubprogram' lab)
dispScopeLineLens :: forall lab f. Functor f => (Word32 -> f Word32) -> DISubprogram' lab -> f (DISubprogram' lab)
dispTemplateParamsLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DISubprogram' lab -> f (DISubprogram' lab)
dispThisAdjustmentLens :: forall lab f. Functor f => (Int64 -> f Int64) -> DISubprogram' lab -> f (DISubprogram' lab)
dispThrownTypesLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DISubprogram' lab -> f (DISubprogram' lab)
dispTypeLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DISubprogram' lab -> f (DISubprogram' lab)
dispUnitLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DISubprogram' lab -> f (DISubprogram' lab)
dispVirtualIndexLens :: forall lab f. Functor f => (Word32 -> f Word32) -> DISubprogram' lab -> f (DISubprogram' lab)
dispVirtualityLens :: forall lab f. Functor f => (DwarfVirtuality -> f DwarfVirtuality) -> DISubprogram' lab -> f (DISubprogram' lab)
distFlagsLens :: forall lab f. Functor f => (DIFlags -> f DIFlags) -> DISubroutineType' lab -> f (DISubroutineType' lab)
distTypeArrayLens :: forall lab1 lab2 f. Functor f => (Maybe (ValMd' lab1) -> f (Maybe (ValMd' lab2))) -> DISubroutineType' lab1 -> f (DISubroutineType' lab2)
dilvAlignmentLens :: forall lab f. Functor f => (Maybe Word32 -> f (Maybe Word32)) -> DILocalVariable' lab -> f (DILocalVariable' lab)
dilvAnnotationsLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DILocalVariable' lab -> f (DILocalVariable' lab)
dilvArgLens :: forall lab f. Functor f => (Word16 -> f Word16) -> DILocalVariable' lab -> f (DILocalVariable' lab)
dilvFileLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DILocalVariable' lab -> f (DILocalVariable' lab)
dilvFlagsLens :: forall lab f. Functor f => (DIFlags -> f DIFlags) -> DILocalVariable' lab -> f (DILocalVariable' lab)
dilvLineLens :: forall lab f. Functor f => (Word32 -> f Word32) -> DILocalVariable' lab -> f (DILocalVariable' lab)
dilvNameLens :: forall lab f. Functor f => (Maybe String -> f (Maybe String)) -> DILocalVariable' lab -> f (DILocalVariable' lab)
dilvScopeLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DILocalVariable' lab -> f (DILocalVariable' lab)
dilvTypeLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DILocalVariable' lab -> f (DILocalVariable' lab)
digveExpressionLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DIGlobalVariableExpression' lab -> f (DIGlobalVariableExpression' lab)
digveVariableLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DIGlobalVariableExpression' lab -> f (DIGlobalVariableExpression' lab)
digvAlignmentLens :: forall lab f. Functor f => (Maybe Word32 -> f (Maybe Word32)) -> DIGlobalVariable' lab -> f (DIGlobalVariable' lab)
digvAnnotationsLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DIGlobalVariable' lab -> f (DIGlobalVariable' lab)
digvDeclarationLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DIGlobalVariable' lab -> f (DIGlobalVariable' lab)
digvFileLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DIGlobalVariable' lab -> f (DIGlobalVariable' lab)
digvIsDefinitionLens :: forall lab f. Functor f => (Bool -> f Bool) -> DIGlobalVariable' lab -> f (DIGlobalVariable' lab)
digvIsLocalLens :: forall lab f. Functor f => (Bool -> f Bool) -> DIGlobalVariable' lab -> f (DIGlobalVariable' lab)
digvLineLens :: forall lab f. Functor f => (Word32 -> f Word32) -> DIGlobalVariable' lab -> f (DIGlobalVariable' lab)
digvLinkageNameLens :: forall lab f. Functor f => (Maybe String -> f (Maybe String)) -> DIGlobalVariable' lab -> f (DIGlobalVariable' lab)
digvNameLens :: forall lab f. Functor f => (Maybe String -> f (Maybe String)) -> DIGlobalVariable' lab -> f (DIGlobalVariable' lab)
digvScopeLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DIGlobalVariable' lab -> f (DIGlobalVariable' lab)
digvTypeLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DIGlobalVariable' lab -> f (DIGlobalVariable' lab)
digvVariableLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DIGlobalVariable' lab -> f (DIGlobalVariable' lab)
dicuDWOIdLens :: forall lab f. Functor f => (Word64 -> f Word64) -> DICompileUnit' lab -> f (DICompileUnit' lab)
dicuDebugInfoForProfLens :: forall lab f. Functor f => (Bool -> f Bool) -> DICompileUnit' lab -> f (DICompileUnit' lab)
dicuEmissionKindLens :: forall lab f. Functor f => (DIEmissionKind -> f DIEmissionKind) -> DICompileUnit' lab -> f (DICompileUnit' lab)
dicuEnumsLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DICompileUnit' lab -> f (DICompileUnit' lab)
dicuFileLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DICompileUnit' lab -> f (DICompileUnit' lab)
dicuFlagsLens :: forall lab f. Functor f => (Maybe String -> f (Maybe String)) -> DICompileUnit' lab -> f (DICompileUnit' lab)
dicuGlobalsLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DICompileUnit' lab -> f (DICompileUnit' lab)
dicuImportsLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DICompileUnit' lab -> f (DICompileUnit' lab)
dicuIsOptimizedLens :: forall lab f. Functor f => (Bool -> f Bool) -> DICompileUnit' lab -> f (DICompileUnit' lab)
dicuLanguageLens :: forall lab f. Functor f => (DwarfLang -> f DwarfLang) -> DICompileUnit' lab -> f (DICompileUnit' lab)
dicuMacrosLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DICompileUnit' lab -> f (DICompileUnit' lab)
dicuNameTableKindLens :: forall lab f. Functor f => (Word64 -> f Word64) -> DICompileUnit' lab -> f (DICompileUnit' lab)
dicuProducerLens :: forall lab f. Functor f => (Maybe String -> f (Maybe String)) -> DICompileUnit' lab -> f (DICompileUnit' lab)
dicuRangesBaseAddressLens :: forall lab f. Functor f => (Bool -> f Bool) -> DICompileUnit' lab -> f (DICompileUnit' lab)
dicuRetainedTypesLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DICompileUnit' lab -> f (DICompileUnit' lab)
dicuRuntimeVersionLens :: forall lab f. Functor f => (Word16 -> f Word16) -> DICompileUnit' lab -> f (DICompileUnit' lab)
dicuSDKLens :: forall lab f. Functor f => (Maybe String -> f (Maybe String)) -> DICompileUnit' lab -> f (DICompileUnit' lab)
dicuSplitDebugFilenameLens :: forall lab f. Functor f => (Maybe FilePath -> f (Maybe FilePath)) -> DICompileUnit' lab -> f (DICompileUnit' lab)
dicuSplitDebugInliningLens :: forall lab f. Functor f => (Bool -> f Bool) -> DICompileUnit' lab -> f (DICompileUnit' lab)
dicuSubprogramsLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DICompileUnit' lab -> f (DICompileUnit' lab)
dicuSysRootLens :: forall lab f. Functor f => (Maybe String -> f (Maybe String)) -> DICompileUnit' lab -> f (DICompileUnit' lab)
dictAlignLens :: forall lab f. Functor f => (Word64 -> f Word64) -> DICompositeType' lab -> f (DICompositeType' lab)
dictAllocatedLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DICompositeType' lab -> f (DICompositeType' lab)
dictAnnotationsLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DICompositeType' lab -> f (DICompositeType' lab)
dictAssociatedLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DICompositeType' lab -> f (DICompositeType' lab)
dictBaseTypeLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DICompositeType' lab -> f (DICompositeType' lab)
dictDataLocationLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DICompositeType' lab -> f (DICompositeType' lab)
dictDiscriminatorLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DICompositeType' lab -> f (DICompositeType' lab)
dictElementsLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DICompositeType' lab -> f (DICompositeType' lab)
dictFileLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DICompositeType' lab -> f (DICompositeType' lab)
dictFlagsLens :: forall lab f. Functor f => (DIFlags -> f DIFlags) -> DICompositeType' lab -> f (DICompositeType' lab)
dictIdentifierLens :: forall lab f. Functor f => (Maybe String -> f (Maybe String)) -> DICompositeType' lab -> f (DICompositeType' lab)
dictLineLens :: forall lab f. Functor f => (Word32 -> f Word32) -> DICompositeType' lab -> f (DICompositeType' lab)
dictNameLens :: forall lab f. Functor f => (Maybe String -> f (Maybe String)) -> DICompositeType' lab -> f (DICompositeType' lab)
dictOffsetLens :: forall lab f. Functor f => (Word64 -> f Word64) -> DICompositeType' lab -> f (DICompositeType' lab)
dictRankLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DICompositeType' lab -> f (DICompositeType' lab)
dictRuntimeLangLens :: forall lab f. Functor f => (DwarfLang -> f DwarfLang) -> DICompositeType' lab -> f (DICompositeType' lab)
dictScopeLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DICompositeType' lab -> f (DICompositeType' lab)
dictSizeLens :: forall lab f. Functor f => (Word64 -> f Word64) -> DICompositeType' lab -> f (DICompositeType' lab)
dictTagLens :: forall lab f. Functor f => (DwarfTag -> f DwarfTag) -> DICompositeType' lab -> f (DICompositeType' lab)
dictTemplateParamsLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DICompositeType' lab -> f (DICompositeType' lab)
dictVTableHolderLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DICompositeType' lab -> f (DICompositeType' lab)
didtAlignLens :: forall lab f. Functor f => (Word64 -> f Word64) -> DIDerivedType' lab -> f (DIDerivedType' lab)
didtAnnotationsLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DIDerivedType' lab -> f (DIDerivedType' lab)
didtBaseTypeLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DIDerivedType' lab -> f (DIDerivedType' lab)
didtDwarfAddressSpaceLens :: forall lab f. Functor f => (Maybe Word32 -> f (Maybe Word32)) -> DIDerivedType' lab -> f (DIDerivedType' lab)
didtExtraDataLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DIDerivedType' lab -> f (DIDerivedType' lab)
didtFileLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DIDerivedType' lab -> f (DIDerivedType' lab)
didtFlagsLens :: forall lab f. Functor f => (DIFlags -> f DIFlags) -> DIDerivedType' lab -> f (DIDerivedType' lab)
didtLineLens :: forall lab f. Functor f => (Word32 -> f Word32) -> DIDerivedType' lab -> f (DIDerivedType' lab)
didtNameLens :: forall lab f. Functor f => (Maybe String -> f (Maybe String)) -> DIDerivedType' lab -> f (DIDerivedType' lab)
didtOffsetLens :: forall lab f. Functor f => (Word64 -> f Word64) -> DIDerivedType' lab -> f (DIDerivedType' lab)
didtScopeLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DIDerivedType' lab -> f (DIDerivedType' lab)
didtSizeLens :: forall lab f. Functor f => (Word64 -> f Word64) -> DIDerivedType' lab -> f (DIDerivedType' lab)
didtTagLens :: forall lab f. Functor f => (DwarfTag -> f DwarfTag) -> DIDerivedType' lab -> f (DIDerivedType' lab)
dilbColumnLens :: forall lab f. Functor f => (Word16 -> f Word16) -> DILexicalBlock' lab -> f (DILexicalBlock' lab)
dilbFileLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DILexicalBlock' lab -> f (DILexicalBlock' lab)
dilbLineLens :: forall lab f. Functor f => (Word32 -> f Word32) -> DILexicalBlock' lab -> f (DILexicalBlock' lab)
dilbScopeLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DILexicalBlock' lab -> f (DILexicalBlock' lab)
dilbfDiscriminatorLens :: forall lab f. Functor f => (Word32 -> f Word32) -> DILexicalBlockFile' lab -> f (DILexicalBlockFile' lab)
dilbfFileLens :: forall lab f. Functor f => (Maybe (ValMd' lab) -> f (Maybe (ValMd' lab))) -> DILexicalBlockFile' lab -> f (DILexicalBlockFile' lab)
dilbfScopeLens :: forall lab f. Functor f => (ValMd' lab -> f (ValMd' lab)) -> DILexicalBlockFile' lab -> f (DILexicalBlockFile' lab)
dialArgsLens :: forall lab1 lab2 f. Functor f => ([ValMd' lab1] -> f [ValMd' lab2]) -> DIArgList' lab1 -> f (DIArgList' lab2)
getGCLens :: Lens' GC String
defArgsLens :: Lens' Define [Typed Ident]
defAttrsLens :: Lens' Define [FunAttr]
defBodyLens :: Lens' Define [BasicBlock]
defComdatLens :: Lens' Define (Maybe String)
defGCLens :: Lens' Define (Maybe GC)
defLinkageLens :: Lens' Define (Maybe Linkage)
defMetadataLens :: Lens' Define FnMdAttachments
defNameLens :: Lens' Define Symbol
defRetTypeLens :: Lens' Define Type
defSectionLens :: Lens' Define (Maybe String)
defVarArgsLens :: Lens' Define Bool
defVisibilityLens :: Lens' Define (Maybe Visibility)


module Text.LLVM.Triple.Print

-- | <tt>llvm::Triple::getArchTypeName</tt>.
--   
--   Retained in the order in which they appear in the LLVM source, rather
--   than an order consistent with the constructors of <a>Arch</a>.
archName :: Arch -> String

-- | <tt>llvm::Triple::getVendorTypeName</tt>.
--   
--   Retained in the order in which they appear in the LLVM source.
vendorName :: Vendor -> String

-- | <tt>llvm::Triple::getOSTypeName</tt>.
--   
--   Retained in the order in which they appear in the LLVM source.
osName :: OS -> String

-- | <tt>llvm::Triple::getEnvironmentName</tt>.
--   
--   Retained in the order in which they appear in the LLVM source.
envName :: Environment -> String

-- | <pre>
--   llvm::Triple::getObjectFormatTypeName
--   </pre>
--   
--   Retained in the order in which they appear in the LLVM source.
objFmtName :: ObjectFormat -> String
printTriple :: TargetTriple -> String


-- | The declarations appear in this module in the same order as in the
--   LLVM source.
module Text.LLVM.Triple.Parse

-- | <pre>
--   llvm::parseArch
--   </pre>
--   
--   
--   <a>https://github.com/llvm/llvm-project/blob/llvmorg-15.0.1/llvm/lib/Support/Triple.cpp#L442</a>
parseArch :: String -> Arch

-- | <pre>
--   llvm::parseVendor
--   </pre>
--   
--   
--   <a>https://github.com/llvm/llvm-project/blob/llvmorg-15.0.1/llvm/lib/Support/Triple.cpp#L529</a>
parseVendor :: String -> Vendor

-- | <pre>
--   llvm::parseOS
--   </pre>
--   
--   
--   <a>https://github.com/llvm/llvm-project/blob/llvmorg-15.0.1/llvm/lib/Support/Triple.cpp#L549</a>
parseOS :: String -> OS

-- | <pre>
--   llvm::parseEnvironment
--   </pre>
--   
--   
--   <a>https://github.com/llvm/llvm-project/blob/llvmorg-15.0.1/llvm/lib/Support/Triple.cpp#L593</a>
parseEnv :: String -> Environment

-- | <pre>
--   llvm::parseFormat
--   </pre>
--   
--   
--   <a>https://github.com/llvm/llvm-project/blob/llvmorg-15.0.1/llvm/lib/Support/Triple.cpp#L634</a>
parseObjFmt :: String -> ObjectFormat

-- | <pre>
--   llvm::parseSubArch
--   </pre>
--   
--   
--   <a>https://github.com/llvm/llvm-project/blob/llvmorg-15.0.1/llvm/lib/Support/Triple.cpp#L648</a>
parseSubArch :: String -> SubArch

-- | <pre>
--   llvm::Triple::Triple
--   </pre>
--   
--   
--   <a>https://github.com/llvm/llvm-project/blob/llvmorg-15.0.1/llvm/lib/Support/Triple.cpp#L869</a>
parseTriple :: String -> TargetTriple


module Text.LLVM.Triple


-- | This is the pretty-printer for llvm assembly versions 3.6 and lower.
module Text.LLVM.PP

-- | The value used to specify the LLVM major version. The LLVM text format
--   (i.e. assembly code) changes with different versions of LLVM, so this
--   value is used to select the version the output should be generated
--   for.
--   
--   At the current time, changes primarily occur when the LLVM major
--   version changes, and this is expected to be the case going forward, so
--   it is sufficient to reference the LLVM version by the single major
--   version number. There is one exception and one possible future
--   exception to this approach:
--   
--   <ol>
--   <li>During LLVM v3, there were changes in 3.5, 3.6, 3.7, and 3.8.
--   There are explicit <tt>ppLLVMnn</tt> function entry points for those
--   versions, but in the event that a numerical value is needed, we note
--   the serendipitous fact that prior to LLVM 4, there are exactly 4
--   versions we need to differentiate and can therefore assign the values
--   of 0, 1, 2, and 3 to those versions (and we have no intention of
--   supporting any other pre-4.0 versions at this point).</li>
--   <li>If at some future date, there are text format changes associated
--   with a minor version, then the LLVM version designation here will need
--   to be enhanced and made more sophisticated. At the present time, the
--   likelihood of that is small enough that the current simple
--   implementation is a benefit over a more complex mechanism that might
--   not be needed.</li>
--   </ol>
type LLVMVer = Int

-- | Helpers for specifying the LLVM versions prior to v4
llvmV3_5 :: LLVMVer

-- | Helpers for specifying the LLVM versions prior to v4
llvmV3_6 :: LLVMVer

-- | Helpers for specifying the LLVM versions prior to v4
llvmV3_7 :: LLVMVer

-- | Helpers for specifying the LLVM versions prior to v4
llvmV3_8 :: LLVMVer

-- | This value should be updated when support is added for new LLVM
--   versions; this is used for defaulting and otherwise reporting the
--   maximum LLVM version known to be supported.
llvmVlatest :: LLVMVer

-- | The differences between various versions of the llvm textual AST.
newtype Config
Config :: LLVMVer -> Config
[cfgVer] :: Config -> LLVMVer
withConfig :: Config -> ((?config :: Config) => a) -> a
ppLLVM :: LLVMVer -> ((?config :: Config) => a) -> a
ppLLVM35 :: ((?config :: Config) => a) -> a
ppLLVM36 :: ((?config :: Config) => a) -> a
ppLLVM37 :: ((?config :: Config) => a) -> a
ppLLVM38 :: ((?config :: Config) => a) -> a
llvmVer :: (?config :: Config) => LLVMVer
llvmVerToString :: LLVMVer -> String

-- | This is a helper function for when a list of parameters is gated by a
--   condition (usually the llvmVer value).
when' :: Monoid a => Bool -> a -> a

-- | This type encapsulates the ability to convert an object into Doc
--   format. Using this abstraction allows for a consolidated
--   representation of the declaration. Most pretty-printing for LLVM
--   elements will have a <tt><a>Fmt</a> a</tt> function signature for that
--   element.
type Fmt a = ?config :: Config => a -> Doc

-- | The LLVMPretty class has instances for most AST elements. It allows
--   the conversion of an AST element (and its sub-elements) into a Doc
--   assembly format by simply using the <a>llvmPP</a> method rather than
--   needing to explicitly invoke the specific pretty-printing function for
--   that element.
class LLVMPretty a
llvmPP :: LLVMPretty a => Fmt a
ppModule :: Fmt Module
ppSourceName :: Fmt (Maybe String)
ppNamedMd :: Fmt NamedMd
ppUnnamedMd :: Fmt UnnamedMd
ppGlobalAlias :: Fmt GlobalAlias

-- | Pretty print a <a>TargetTriple</a>
ppTargetTriple :: Fmt TargetTriple

-- | Pretty print a data layout specification.
ppDataLayout :: Fmt DataLayout

-- | Pretty print a single layout specification.
ppLayoutSpec :: Fmt LayoutSpec

-- | Pretty-print the common case for data layout specifications.
ppLayoutBody :: Int -> Int -> Fmt (Maybe Int)
ppFunctionPointerAlignType :: Fmt FunctionPointerAlignType
ppMangling :: Fmt Mangling

-- | Pretty-print the inline assembly block.
ppInlineAsm :: Fmt InlineAsm
ppIdent :: Fmt Ident

-- | According to the LLVM Language Reference Manual, the regular
--   expression for LLVM identifiers is "[-a-zA-Z$._][-a-zA-Z$._0-9]".
--   Identifiers may also be strings of one or more decimal digits.
validIdentifier :: String -> Bool
ppSymbol :: Fmt Symbol
ppPrimType :: Fmt PrimType
ppFloatType :: Fmt FloatType
ppType :: Fmt Type
ppTypeDecl :: Fmt TypeDecl
ppGlobal :: Fmt Global

-- | Pretty-print Global Attributes (usually associated with a global
--   variable declaration). The first argument to ppGlobalAttrs indicates
--   whether there is a value associated with this global declaration: a
--   global declaration with a value should not be identified as "external"
--   and "default" visibility, whereas one without a value may have those
--   attributes.
ppGlobalAttrs :: Bool -> Fmt GlobalAttrs
ppDeclare :: Fmt Declare
ppComdatName :: Fmt String
ppComdat :: Fmt (String, SelectionKind)
ppSelectionKind :: Fmt SelectionKind
ppDefine :: Fmt Define
ppFunAttr :: Fmt FunAttr
ppLabelDef :: Fmt BlockLabel
ppLabel :: Fmt BlockLabel
ppBasicBlock :: Fmt BasicBlock
ppStmt :: Fmt Stmt
ppAttachedMetadata :: Fmt [(String, ValMd)]
ppLinkage :: Fmt Linkage
ppVisibility :: Fmt Visibility
ppGC :: Fmt GC
ppTyped :: Fmt a -> Fmt (Typed a)
ppSignBits :: Bool -> Fmt Bool
ppExact :: Fmt Bool
ppArithOp :: Fmt ArithOp
ppUnaryArithOp :: Fmt UnaryArithOp
ppBitOp :: Fmt BitOp
ppConvOp :: Fmt ConvOp
ppAtomicOrdering :: Fmt AtomicOrdering
ppAtomicOp :: Fmt AtomicRWOp
ppScope :: Fmt (Maybe String)
ppInstr :: Fmt Instr
ppLoad :: Type -> Typed (Value' BlockLabel) -> Maybe AtomicOrdering -> Fmt (Maybe Align)
ppStore :: Typed (Value' BlockLabel) -> Typed (Value' BlockLabel) -> Maybe AtomicOrdering -> Fmt (Maybe Align)
ppClauses :: Bool -> Fmt [Clause]
ppClause :: Fmt Clause
ppTypedLabel :: Fmt BlockLabel
ppSwitchEntry :: Type -> Fmt (Integer, BlockLabel)
ppVectorIndex :: Fmt Value
ppAlign :: Fmt (Maybe Align)
ppAlloca :: Type -> Maybe (Typed Value) -> Fmt (Maybe Int)
ppCall :: Bool -> Type -> Value -> Fmt [Typed Value]

-- | Note that the textual syntax changed in LLVM 10 (<tt>callbr</tt> was
--   introduced in LLVM 9).
ppCallBr :: Type -> Value -> [Typed Value] -> BlockLabel -> Fmt [BlockLabel]

-- | Print out the <tt><a>ty</a>|<a>fnty</a> <a>fnptrval</a></tt> portion
--   of a <tt>call</tt>, <tt>callbr</tt>, or <tt>invoke</tt> instruction,
--   where:
--   
--   <ul>
--   <li><tt><a>ty</a></tt> is the return type.</li>
--   <li><tt><a>fnty</a></tt> is the overall function type.</li>
--   <li><tt><a>fnptrval</a></tt> is a pointer value, where the memory it
--   points to is treated as a value of type <tt><a>fnty</a></tt>.</li>
--   </ul>
--   
--   The LLVM Language Reference Manual indicates that either
--   <tt><a>ty</a></tt> or <tt><a>fnty</a></tt> can be used, but in
--   practice, <tt><a>ty</a></tt> is typically preferred unless the
--   function type involves varargs. We adopt the same convention here.
ppCallSym :: Type -> Fmt Value
ppGEP :: Bool -> Type -> Typed Value -> Fmt [Typed Value]
ppInvoke :: Type -> Value -> [Typed Value] -> BlockLabel -> Fmt BlockLabel
ppPhiArg :: Fmt (Value, BlockLabel)
ppICmpOp :: Fmt ICmpOp
ppFCmpOp :: Fmt FCmpOp
ppValue' :: Fmt i -> Fmt (Value' i)
ppValue :: Fmt Value
ppValMd' :: Fmt i -> Fmt (ValMd' i)
ppValMd :: Fmt ValMd
ppDebugLoc' :: Fmt i -> Fmt (DebugLoc' i)
ppDebugLoc :: Fmt DebugLoc
ppTypedValMd :: Fmt ValMd
ppMetadata :: Fmt Doc
ppMetadataNode' :: Fmt i -> Fmt [Maybe (ValMd' i)]
ppMetadataNode :: Fmt [Maybe ValMd]
ppStringLiteral :: Fmt String
ppAsm :: Bool -> Bool -> String -> Fmt String
ppConstExpr' :: Fmt i -> Fmt (ConstExpr' i)
ppConstExpr :: Fmt ConstExpr
ppDebugInfo' :: Fmt i -> Fmt (DebugInfo' i)
ppDebugInfo :: Fmt DebugInfo
ppDIImportedEntity' :: Fmt i -> Fmt (DIImportedEntity' i)
ppDIImportedEntity :: Fmt DIImportedEntity
ppDILabel' :: Fmt i -> Fmt (DILabel' i)
ppDILabel :: Fmt DILabel
ppDINameSpace' :: Fmt i -> Fmt (DINameSpace' i)
ppDINameSpace :: Fmt DINameSpace
ppDITemplateTypeParameter' :: Fmt i -> Fmt (DITemplateTypeParameter' i)
ppDITemplateTypeParameter :: Fmt DITemplateTypeParameter
ppDITemplateValueParameter' :: Fmt i -> Fmt (DITemplateValueParameter' i)
ppDITemplateValueParameter :: Fmt DITemplateValueParameter
ppDIBasicType :: Fmt DIBasicType
ppDICompileUnit' :: Fmt i -> Fmt (DICompileUnit' i)
ppDICompileUnit :: Fmt DICompileUnit
ppFlags :: Fmt (Maybe String)
ppDICompositeType' :: Fmt i -> Fmt (DICompositeType' i)
ppDICompositeType :: Fmt DICompositeType
ppDIDerivedType' :: Fmt i -> Fmt (DIDerivedType' i)
ppDIDerivedType :: Fmt DIDerivedType
ppDIEnumerator :: String -> Integer -> Fmt Bool
ppDIExpression :: Fmt DIExpression
ppDIFile :: Fmt DIFile
ppDIGlobalVariable' :: Fmt i -> Fmt (DIGlobalVariable' i)
ppDIGlobalVariable :: Fmt DIGlobalVariable
ppDIGlobalVariableExpression' :: Fmt i -> Fmt (DIGlobalVariableExpression' i)
ppDIGlobalVariableExpression :: Fmt DIGlobalVariableExpression
ppDILexicalBlock' :: Fmt i -> Fmt (DILexicalBlock' i)
ppDILexicalBlock :: Fmt DILexicalBlock
ppDILexicalBlockFile' :: Fmt i -> Fmt (DILexicalBlockFile' i)
ppDILexicalBlockFile :: Fmt DILexicalBlockFile
ppDILocalVariable' :: Fmt i -> Fmt (DILocalVariable' i)
ppDILocalVariable :: Fmt DILocalVariable

-- | See <tt>writeDISubprogram</tt> in the LLVM source, in the file
--   <tt>AsmWriter.cpp</tt>
--   
--   Note that the textual syntax changed in LLVM 7, as the
--   <tt>retainedNodes</tt> field was called <tt>variables</tt> in previous
--   LLVM versions.
ppDISubprogram' :: Fmt i -> Fmt (DISubprogram' i)
ppDISubprogram :: Fmt DISubprogram
ppDISubrange' :: Fmt i -> Fmt (DISubrange' i)
ppDISubrange :: Fmt DISubrange
ppDISubroutineType' :: Fmt i -> Fmt (DISubroutineType' i)
ppDISubroutineType :: Fmt DISubroutineType
ppDIArgList' :: Fmt i -> Fmt (DIArgList' i)
ppDIArgList :: Fmt DIArgList
ppBool :: Fmt Bool

-- | Build a variable-argument argument list.
ppArgList :: Bool -> Fmt [Doc]
integral :: Integral i => Fmt i
hex :: (Integral i, Show i) => Fmt i
opt :: Bool -> Fmt Doc

-- | Print a ValMd' value as a plain signed integer (Int64) if possible. If
--   the ValMd' is not representable as an Int64, defer to ValMd' printing
--   (if canFallBack is True) or print nothing (for when a ValMd is not a
--   valid representation).
ppInt64ValMd' :: Bool -> Fmt i -> Fmt (ValMd' i)
commas :: Fmt [Doc]

-- | Helpful for all of the optional fields that appear in the metadata
--   values
mcommas :: Fmt [Maybe Doc]
angles :: Fmt Doc
structBraces :: Fmt Doc
ppMaybe :: Fmt a -> Fmt (Maybe a)

-- | Throw an error if the <tt>?config</tt> version is older than the given
--   version. The String indicates which constructor is unavailable in the
--   error message.
onlyOnLLVM :: (?config :: Config) => LLVMVer -> String -> a -> a
instance Text.LLVM.PP.LLVMPretty Text.LLVM.AST.Ident
instance Text.LLVM.PP.LLVMPretty Text.LLVM.AST.Module
instance Text.LLVM.PP.LLVMPretty Text.LLVM.AST.Symbol
