Patterns Module
Contains a set of primitive F# active patterns to analyze F# expression objects
Active patterns
Active pattern |
Description
|
|
|
|
|
|
|
Full Usage:
(|CallWithWitnesses|_|) input
Parameters:
Expr
-
The input expression to match against.
Returns: (Expr option * MethodInfo * MethodInfo * Expr list * Expr list) option
When successful, the pattern binds the object, method, witness-argument and argument sub-expressions of the input expression
|
An active pattern to recognize expressions that represent calls to static and instance methods, and functions defined in modules, including witness arguments
|
|
An active pattern to recognize expressions that represent calls to static and instance methods, and functions defined in modules
|
|
|
|
|
|
|
Full Usage:
(|NewObject|_|) input
Parameters:
Expr
-
The input expression to match against.
Returns: (ConstructorInfo * Expr list) option
When successful, the pattern binds the constructor and arguments of the input expression
|
An active pattern to recognize expressions that represent invocation of object constructors
|
|
|
|
|
Full Usage:
(|NewUnionCase|_|) input
Parameters:
Expr
-
The input expression to match against.
Returns: (UnionCaseInfo * Expr list) option
When successful, the pattern binds the union case and field values of the input expression
|
An active pattern to recognize expressions that represent construction of particular union case values
|
|
An active pattern to recognize expressions that represent the read of a static or instance property, or a non-function value declared in a module
|
|
An active pattern to recognize expressions that represent setting a static or instance property, or a non-function value declared in a module
|
|
|
|
|
|
|
|
|
An active pattern to recognize expressions that represent a try/with construct for exception filtering and catching
|
|
|
|
|
|
Full Usage:
(|UnionCaseTest|_|) input
Parameters:
Expr
-
The input expression to match against.
Returns: (Expr * UnionCaseInfo) option
When successful, the pattern binds the expression and union case being tested
|
An active pattern to recognize expressions that represent a test if a value is of a particular union case
|
|
|
|
|
|
|
|
|