Combinators for building abstract syntax.
- assemblyRef :: AssemblyName -> Version -> PublicKeyToken -> AssemblyRef
- entryPoint :: MethodDecl
- localsInit :: [Local] -> MethodDecl
- maxStack :: Int -> MethodDecl
- add :: MethodDecl
- add_ovf :: MethodDecl
- add_ovf_un :: MethodDecl
- and :: MethodDecl
- beq :: Label -> MethodDecl
- bge :: Label -> MethodDecl
- bgt :: Label -> MethodDecl
- ble :: Label -> MethodDecl
- blt :: Label -> MethodDecl
- box :: PrimitiveType -> MethodDecl
- br :: Label -> MethodDecl
- break :: MethodDecl
- brfalse :: Label -> MethodDecl
- brtrue :: Label -> MethodDecl
- call :: [CallConv] -> PrimitiveType -> AssemblyName -> TypeName -> MethodName -> [PrimitiveType] -> MethodDecl
- callvirt :: PrimitiveType -> AssemblyName -> TypeName -> MethodName -> [PrimitiveType] -> MethodDecl
- ceq :: MethodDecl
- cgt :: MethodDecl
- ckfinite :: MethodDecl
- clt :: MethodDecl
- dup :: MethodDecl
- div :: MethodDecl
- div_un :: MethodDecl
- isinst :: TypeName -> MethodDecl
- ldarg :: Offset -> MethodDecl
- ldargN :: DottedName -> MethodDecl
- ldc_i4 :: Integer -> MethodDecl
- ldc_i8 :: Integer -> MethodDecl
- ldc_r4 :: Float -> MethodDecl
- ldc_r8 :: Double -> MethodDecl
- ldchar :: Char -> MethodDecl
- ldelem_i :: MethodDecl
- ldelem_i1 :: MethodDecl
- ldelem_i2 :: MethodDecl
- ldelem_i4 :: MethodDecl
- ldelem_i8 :: MethodDecl
- ldelem_u1 :: MethodDecl
- ldelem_u2 :: MethodDecl
- ldelem_u4 :: MethodDecl
- ldelem_u8 :: MethodDecl
- ldelem_r4 :: MethodDecl
- ldelem_r8 :: MethodDecl
- ldelem_ref :: MethodDecl
- ldelema :: MethodDecl
- ldfld :: PrimitiveType -> AssemblyName -> TypeName -> FieldName -> MethodDecl
- ldflda :: PrimitiveType -> AssemblyName -> TypeName -> FieldName -> MethodDecl
- ldftn :: PrimitiveType -> AssemblyName -> TypeName -> MethodName -> [PrimitiveType] -> MethodDecl
- ldind_i :: MethodDecl
- ldind_i1 :: MethodDecl
- ldind_i2 :: MethodDecl
- ldind_i4 :: MethodDecl
- ldind_i8 :: MethodDecl
- ldind_r4 :: MethodDecl
- ldind_r8 :: MethodDecl
- ldind_ref :: MethodDecl
- ldind_u1 :: MethodDecl
- ldind_u2 :: MethodDecl
- ldind_u4 :: MethodDecl
- ldlen :: MethodDecl
- ldloc :: Offset -> MethodDecl
- ldlocN :: LocalName -> MethodDecl
- ldloca :: Offset -> MethodDecl
- ldlocaN :: LocalName -> MethodDecl
- ldnull :: MethodDecl
- ldsfld :: PrimitiveType -> AssemblyName -> TypeName -> FieldName -> MethodDecl
- ldsflda :: PrimitiveType -> AssemblyName -> TypeName -> FieldName -> MethodDecl
- ldstr :: String -> MethodDecl
- mul :: MethodDecl
- mul_ovf :: MethodDecl
- mul_ovf_un :: MethodDecl
- neg :: MethodDecl
- newarr :: PrimitiveType -> MethodDecl
- newobj :: AssemblyName -> TypeName -> [PrimitiveType] -> MethodDecl
- nop :: MethodDecl
- not :: MethodDecl
- or :: MethodDecl
- pop :: MethodDecl
- rem :: MethodDecl
- rem_un :: MethodDecl
- ret :: MethodDecl
- shl :: MethodDecl
- shr :: MethodDecl
- shr_un :: MethodDecl
- stelem_i :: MethodDecl
- stelem_i1 :: MethodDecl
- stelem_i2 :: MethodDecl
- stelem_i4 :: MethodDecl
- stelem_i8 :: MethodDecl
- stelem_r4 :: MethodDecl
- stelem_r8 :: MethodDecl
- stelem_ref :: MethodDecl
- stfld :: PrimitiveType -> AssemblyName -> TypeName -> FieldName -> MethodDecl
- stind_i :: MethodDecl
- stind_i1 :: MethodDecl
- stind_i2 :: MethodDecl
- stind_i4 :: MethodDecl
- stind_i8 :: MethodDecl
- stind_r4 :: MethodDecl
- stind_r8 :: MethodDecl
- stind_ref :: MethodDecl
- stloc :: Offset -> MethodDecl
- stlocN :: LocalName -> MethodDecl
- stsfld :: PrimitiveType -> AssemblyName -> TypeName -> FieldName -> MethodDecl
- sub :: MethodDecl
- sub_ovf :: MethodDecl
- sub_ovf_un :: MethodDecl
- tail :: MethodDecl
- tailcall :: MethodDecl -> MethodDecl
- throw :: MethodDecl
- unaligned :: Alignment -> MethodDecl
- unalignedPtr :: Alignment -> MethodDecl -> MethodDecl
- unbox :: PrimitiveType -> MethodDecl
- volatile :: MethodDecl
- volatilePtr :: MethodDecl -> MethodDecl
- xor :: MethodDecl
- label :: Label -> MethodDecl -> MethodDecl
- comment :: String -> MethodDecl
- extends :: TypeName -> Maybe TypeSpec
- noExtends :: Maybe TypeSpec
- noImplements :: [TypeSpec]
- classDef :: [ClassAttr] -> TypeName -> Maybe TypeSpec -> [TypeSpec] -> [FieldDef] -> [MethodDef] -> [TypeDef] -> TypeDef
- defaultCtor :: [Parameter] -> MethodDef
- extendsCtor :: AssemblyName -> TypeName -> [Parameter] -> MethodDef
- simpleAssembly :: [MethodDecl] -> Assembly
- mscorlibRef :: AssemblyRef
Assembly ref functions
assemblyRef :: AssemblyName -> Version -> PublicKeyToken -> AssemblyRefSource
Directive functions
localsInit :: [Local] -> MethodDeclSource
maxStack :: Int -> MethodDeclSource
mdecl functions
beq :: Label -> MethodDeclSource
bge :: Label -> MethodDeclSource
bgt :: Label -> MethodDeclSource
ble :: Label -> MethodDeclSource
blt :: Label -> MethodDeclSource
box :: PrimitiveType -> MethodDeclSource
br :: Label -> MethodDeclSource
brfalse :: Label -> MethodDeclSource
brtrue :: Label -> MethodDeclSource
call :: [CallConv] -> PrimitiveType -> AssemblyName -> TypeName -> MethodName -> [PrimitiveType] -> MethodDeclSource
callvirt :: PrimitiveType -> AssemblyName -> TypeName -> MethodName -> [PrimitiveType] -> MethodDeclSource
isinst :: TypeName -> MethodDeclSource
ldarg :: Offset -> MethodDeclSource
ldargN :: DottedName -> MethodDeclSource
ldc_i4 :: Integer -> MethodDeclSource
ldc_i8 :: Integer -> MethodDeclSource
ldc_r4 :: Float -> MethodDeclSource
ldc_r8 :: Double -> MethodDeclSource
ldchar :: Char -> MethodDeclSource
ldfld :: PrimitiveType -> AssemblyName -> TypeName -> FieldName -> MethodDeclSource
ldflda :: PrimitiveType -> AssemblyName -> TypeName -> FieldName -> MethodDeclSource
ldftn :: PrimitiveType -> AssemblyName -> TypeName -> MethodName -> [PrimitiveType] -> MethodDeclSource
ldloc :: Offset -> MethodDeclSource
ldlocN :: LocalName -> MethodDeclSource
ldloca :: Offset -> MethodDeclSource
ldlocaN :: LocalName -> MethodDeclSource
ldsfld :: PrimitiveType -> AssemblyName -> TypeName -> FieldName -> MethodDeclSource
ldsflda :: PrimitiveType -> AssemblyName -> TypeName -> FieldName -> MethodDeclSource
ldstr :: String -> MethodDeclSource
newobj :: AssemblyName -> TypeName -> [PrimitiveType] -> MethodDeclSource
Creates a new object. Note that this function assumes the constructor returns Void. If this is not the case, call the Newobj constructor manually.
stfld :: PrimitiveType -> AssemblyName -> TypeName -> FieldName -> MethodDeclSource
stloc :: Offset -> MethodDeclSource
stlocN :: LocalName -> MethodDeclSource
stsfld :: PrimitiveType -> AssemblyName -> TypeName -> FieldName -> MethodDeclSource
unalignedPtr :: Alignment -> MethodDecl -> MethodDeclSource
Convenient AST functions
label :: Label -> MethodDecl -> MethodDeclSource
Relabel a labelled mdecl with a new label.
comment :: String -> MethodDeclSource
classDef :: [ClassAttr] -> TypeName -> Maybe TypeSpec -> [TypeSpec] -> [FieldDef] -> [MethodDef] -> [TypeDef] -> TypeDefSource
defaultCtor :: [Parameter] -> MethodDefSource
extendsCtor :: AssemblyName -> TypeName -> [Parameter] -> MethodDefSource
simpleAssembly :: [MethodDecl] -> AssemblySource
Create a simple Assembly with one method containing the provided MethodDecls.