Qit


QitOp Module

Operators to be used within quotations.

Functions and values

Function or value Description

!%%expr

Full Usage: !%%expr

Parameters:
    expr : Expr - Expr<'t> to splice in

Returns: 'a

Splice Expr<'t> into quotation on Quote.expandOperators

expr : Expr

Expr<'t> to splice in

Returns: 'a

!%expr

Full Usage: !%expr

Parameters:
    expr : Expr<'a> - Expr to splice in

Returns: 'a

Splice an Expr into quotation on Quote.expandOperators

expr : Expr<'a>

Expr to splice in

Returns: 'a

!@name

Full Usage: !@name

Parameters:
    name : string - Name of the marker to later retreive the match

Returns: 'a

Used within a quotation to match an Expr of any type.

name : string

Name of the marker to later retreive the match

Returns: 'a

!@@name

Full Usage: !@@name

Parameters:
    name : string - Name of the marker to later retreive the match

Returns: AnyType

Used within a quotation to match an Expr of specific type.

name : string

Name of the marker to later retreive the match

Returns: AnyType

any name

Full Usage: any name

Parameters:
    name : string - Name of the marker to later retreive the match

Returns: AnyType

Used within a quotation to match an Expr of any type.

name : string

Name of the marker to later retreive the match

Returns: AnyType

escapedQuote expr

Full Usage: escapedQuote expr

Parameters:
    expr : Expr<'a> - Typed expression to be included

Returns: Expr<'a>

Include typed expression as is in quotation.

expr : Expr<'a>

Typed expression to be included

Returns: Expr<'a>

escapedQuoteRaw x

Full Usage: escapedQuoteRaw x

Parameters:
Returns: Expr

Include untyped expression as is in quotation.

x : Expr
Returns: Expr

fieldGet field o

Full Usage: fieldGet field o

Parameters:
    field : FieldInfo - FieldInfo of field to get
    o : 'a - Target obj

Returns: 'b

Get field by FieldInfo. Expands to Expr.FieldGet(<@ o @>,field).

field : FieldInfo

FieldInfo of field to get

o : 'a

Target obj

Returns: 'b

fieldGetStatic field

Full Usage: fieldGetStatic field

Parameters:
    field : FieldInfo - FieldInfo of field to get

Returns: 'a

Get static field by FieldInfo. Expands to Expr.FieldGet(field).

field : FieldInfo

FieldInfo of field to get

Returns: 'a

fieldSet field value o

Full Usage: fieldSet field value o

Parameters:
    field : FieldInfo - FieldInfo of field to set
    value : 'a - New field value
    o : 'b - Target obj

Set field by FieldInfo. Expands to Expr.FieldSet(<@o@>,field,<@value@>).

field : FieldInfo

FieldInfo of field to set

value : 'a

New field value

o : 'b

Target obj

fieldSetStatic field value

Full Usage: fieldSetStatic field value

Parameters:
    field : FieldInfo - FieldInfo of field to set
    value : 'a - New field value

Set static field by FieldInfo. Expands to Expr.FieldSet(field,<@value@>).

field : FieldInfo

FieldInfo of field to set

value : 'a

New field value

methodCall method args o

Full Usage: methodCall method args o

Parameters:
    method : MethodInfo - MethodInfo of method to call
    args : obj list - Method arguments
    o : 'a - Target obj

Returns: 'b

Call method by MethodInfo. Expands to Expr.Call(<@o@>,method,args).

method : MethodInfo

MethodInfo of method to call

args : obj list

Method arguments

o : 'a

Target obj

Returns: 'b

methodCallStatic method args

Full Usage: methodCallStatic method args

Parameters:
    method : MethodInfo - MethodInfo of method to call
    args : obj list - Method arguments

Returns: 'c

Call static method by MethodInfo. Expands to Expr.Call(method,args).

method : MethodInfo

MethodInfo of method to call

args : obj list

Method arguments

Returns: 'c

rewriter input rewriteFunc

Full Usage: rewriter input rewriteFunc

Parameters:
    input : 'input - Input argument which is passed to rewriteFunc
    rewriteFunc : Expr list -> Expr -> Expr -> (Expr * Expr) option - Function of type trail : Expr list * thisCall : Expr * arg : Expr -> 'a

Returns: 'a

Define a rewriter within quoted code to be expanded by Quote.expandRewriters. Rewriter is a function of type trail : Expr list * thisCall : Expr * arg : Expr -> 'a where trail is a list of expressions leading to the current expression, thisCall is the current expression and arg is the argument passed to rewrite. rewriteFunc should return (oldExpr, newExpr) option, None would simply expand to the given input, Some(oldExpr,newExpr) would expand to the given input and further replace oldExpr with newExpr in the expression tree using reference equality.

input : 'input

Input argument which is passed to rewriteFunc

rewriteFunc : Expr list -> Expr -> Expr -> (Expr * Expr) option

Function of type trail : Expr list * thisCall : Expr * arg : Expr -> 'a

Returns: 'a

splice x

Full Usage: splice x

Parameters:
Returns: 'a

Splice an Expr<'t> into quotation on Quote.expandOperators

x : Expr<'a>
Returns: 'a

spliceInExpression linqExpr

Full Usage: spliceInExpression linqExpr

Parameters:
    linqExpr : Expression - Linq expression to be cpliced

Returns: 'a

Splice linq expression

linqExpr : Expression

Linq expression to be cpliced

Returns: 'a

spliceInExpressionTyped linqExpr

Full Usage: spliceInExpressionTyped linqExpr

Parameters:
    linqExpr : Expression<'a> - Linq expression to be spliced

Returns: 'a

Splice linq expression

linqExpr : Expression<'a>

Linq expression to be spliced

Returns: 'a

spliceUntyped expr

Full Usage: spliceUntyped expr

Parameters:
    expr : Expr - Expr to splice in

Returns: 'a

Splice Expr into quotation on Quote.expandOperators

expr : Expr

Expr to splice in

Returns: 'a

withType name

Full Usage: withType name

Parameters:
    name : string - Name of the marker to later retreive the match

Returns: 'a

Used within a quotation to match an Expr of specific type.

name : string

Name of the marker to later retreive the match

Returns: 'a