Qit


Patterns Module

Provides active patterns for matching and extracting information from F# quotations and reflection elements (like MethodInfo, PropertyInfo, and FieldInfo).

Active patterns

Active pattern Description

(|AnyMarker|_|) markerName (anyType, _typed)

Full Usage: (|AnyMarker|_|) markerName (anyType, _typed)

Parameters:
Returns: Expr option

Match marker by name in extracted bindings. Only untyped markers are matched.

markerName : string

anyType : IDictionary<string, Expr>
_typed : IDictionary<string, Expr>
Returns: Expr option

(|BindQuote|_|) expr x

Full Usage: (|BindQuote|_|) expr x

Parameters:
    expr : Expr - Expr to match. Can contain Quote.any name and Quote.withType name which will be extracted.
    x : Expr - Expr matching against

Returns: (Dictionary<string, Expr> * Dictionary<string, Expr>) option

Match quoted expression and extract bindings.

expr : Expr

Expr to match. Can contain Quote.any name and Quote.withType name which will be extracted.

x : Expr

Expr matching against

Returns: (Dictionary<string, Expr> * Dictionary<string, Expr>) option

(|FieldName|_|) name fieldInfo

Full Usage: (|FieldName|_|) name fieldInfo

Parameters:
Returns: unit option

Match name of FieldInfo.

name : string

fieldInfo : FieldInfo

Returns: unit option

(|InnerBindQuote|_|) expr x

Full Usage: (|InnerBindQuote|_|) expr x

Parameters:
Returns: (Dictionary<string, Expr> * Dictionary<string, Expr>) option

Match quoted expression anywhere in the expression and extract bindings.

expr : Expr

x : Expr

Returns: (Dictionary<string, Expr> * Dictionary<string, Expr>) option

(|InnerQuote|_|) expr x

Full Usage: (|InnerQuote|_|) expr x

Parameters:
    expr : Expr - Expr to match
    x : Expr - Expr matching against

Returns: unit option

Match quoted expression anywhere in the expression.

expr : Expr

Expr to match

x : Expr

Expr matching against

Returns: unit option

(|Marker|_|) markerName (anyType, typed)

Full Usage: (|Marker|_|) markerName (anyType, typed)

Parameters:
Returns: Expr option

Match marker by name in extracted bindings. Untyped markers are matched first.

markerName : string

anyType : IDictionary<string, Expr>
typed : IDictionary<string, Expr>
Returns: Expr option

(|MethodCall|_|) minfo expr

Full Usage: (|MethodCall|_|) minfo expr

Parameters:
    minfo : MethodInfo - MethodInfo being called.
    expr : Expr - Matching expr.

Returns: (Expr option * Type[] * Expr list) option

Match a call to a MethodInfo, destructures to (intance option * type args list * args list)

minfo : MethodInfo

MethodInfo being called.

expr : Expr

Matching expr.

Returns: (Expr option * Type[] * Expr list) option

(|MethodName|_|) name methodInfo

Full Usage: (|MethodName|_|) name methodInfo

Parameters:
Returns: unit option

Match name of MethodInfo.

name : string

methodInfo : MethodInfo

Returns: unit option

(|PropertyName|_|) name propertyInfo

Full Usage: (|PropertyName|_|) name propertyInfo

Parameters:
    name : string - Name to match
    propertyInfo : PropertyInfo - PropertyInfo matching against

Returns: unit option

Match name of PropertyInfo.

name : string

Name to match

propertyInfo : PropertyInfo

PropertyInfo matching against

Returns: unit option

(|Quote|_|) expr x

Full Usage: (|Quote|_|) expr x

Parameters:
    expr : Expr - Expr to match
    x : Expr - Expr matching against

Returns: unit option

Match quoted expression.

expr : Expr

Expr to match

x : Expr

Expr matching against

Returns: unit option

(|TypedMarker|_|) markerName (_anyType, typed)

Full Usage: (|TypedMarker|_|) markerName (_anyType, typed)

Parameters:
Returns: Expr option

Match marker by name in extracted bindings. Only typed markers are matched.

markerName : string

_anyType : IDictionary<string, Expr>
typed : IDictionary<string, Expr>
Returns: Expr option