Copyright | (c) Galois Inc 2019 |
---|---|
License | BSD3 |
Maintainer | Rob Dockins <rdockins@galois.com> |
Stability | provisional |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
Documentation
llvmType :: QuasiQuoter Source #
This quasiquoter parses values in LLVM type syntax, extended
with metavariables, and builds values of Text.LLVM.AST.Type
.
Type metavariables start with a $
and splice in the named
program variable, which is expected to have type Type
.
Numeric metavariables start with #
and splice in an integer
type whose width is given by the named program variable, which
is expected to be a NatRepr
.
llvmDecl :: QuasiQuoter Source #
This quasiquoter parses values in LLVM function declaration syntax,
extended with metavariables, and builds values of Text.LLVM.AST.Declare
.
Type metavariables start with a $
and splice in the named
program variable, which is expected to have type Type
.
Numeric metavariables start with #
and splice in an integer
type whose width is given by the named program variable, which
is expected to be a NatRepr
.
The name of the declaration may also be a $
metavariable, in which
case the named variable is expeted to be a Symbol
.
llvmOvr :: QuasiQuoter Source #
This quasiquoter parses values in LLVM function declaration syntax,
extended with metavariables, and partially applies the
LLVMOverride
constructor so that it expectes a single remaining
argument to populate the llvmOverride_def
field.
Type metavariables start with a $
and splice in the named
program variable, which is expected to have type Type
.
In addition a related variable must be in scope to give the
crucible TypeRepr
associated. For example variable $x
should be a LLVM Type
and $x_repr
should be a Crucible TypeRepr
.
Numeric metavariables start with #
and splice in an integer
type whose width is given by the named program variable, which
is expected to be a NatRepr
. Both the LLVM type and the Crucible
TypeRepr
are built from the NatRepr
.
The name of the declaration may also be a $
metavariable, in which
case the named variable is expeted to be a Symbol
.