Iteration on dterei's metadata design
[ghc.git] / compiler / llvmGen / Llvm.hs
1 -- ----------------------------------------------------------------------------
2 -- | This module supplies bindings to generate Llvm IR from Haskell
3 -- (<http://www.llvm.org/docs/LangRef.html>).
4 --
5 -- Note: this module is developed in a demand driven way. It is no complete
6 -- LLVM binding library in Haskell, but enough to generate code for GHC.
7 --
8 -- This code is derived from code taken from the Essential Haskell Compiler
9 -- (EHC) project (<http://www.cs.uu.nl/wiki/Ehc/WebHome>).
10 --
11
12 module Llvm (
13
14 -- * Modules, Functions and Blocks
15 LlvmModule(..),
16
17 LlvmFunction(..), LlvmFunctionDecl(..),
18 LlvmFunctions, LlvmFunctionDecls,
19 LlvmStatement(..), LlvmExpression(..),
20 LlvmBlocks, LlvmBlock(..), LlvmBlockId,
21 LlvmParamAttr(..), LlvmParameter,
22
23 -- * Fence synchronization
24 LlvmSyncOrdering(..),
25
26 -- * Call Handling
27 LlvmCallConvention(..), LlvmCallType(..), LlvmParameterListType(..),
28 LlvmLinkageType(..), LlvmFuncAttr(..),
29
30 -- * Operations and Comparisons
31 LlvmCmpOp(..), LlvmMachOp(..), LlvmCastOp(..),
32
33 -- * Variables and Type System
34 LlvmVar(..), LlvmStatic(..), LlvmLit(..), LlvmType(..),
35 LlvmAlias, LMGlobal, LMString, LMSection, LMAlign,
36
37 -- ** Some basic types
38 i64, i32, i16, i8, i1, i8Ptr, llvmWord, llvmWordPtr,
39
40 -- ** Metadata types
41 MetaExpr(..), MetaAnnot(..), MetaDecl(..),
42
43 -- ** Operations on the type system.
44 isGlobal, getLitType, getLit, getName, getPlainName, getVarType,
45 getLink, getStatType, getGlobalVar, getGlobalType, pVarLift, pVarLower,
46 pLift, pLower, isInt, isFloat, isPointer, isVector, llvmWidthInBits,
47
48 -- * Pretty Printing
49 ppLlvmModule, ppLlvmComments, ppLlvmComment, ppLlvmGlobals,
50 ppLlvmGlobal, ppLlvmFunctionDecls, ppLlvmFunctionDecl, ppLlvmFunctions,
51 ppLlvmFunction, ppLlvmAlias, ppLlvmAliases, ppLlvmMetas, ppLlvmMeta,
52
53 ) where
54
55 import Llvm.AbsSyn
56 import Llvm.MetaData
57 import Llvm.PpLlvm
58 import Llvm.Types
59