Share via


Quotations.DerivedPatterns Module (F#)

Contains a set of derived F# active patterns to analyze F# expression objects

Namespace/Module Path: Microsoft.FSharp.Quotations

Assembly: FSharp.Core (in FSharp.Core.dll)

module DerivedPatterns

Active Patterns

Active Pattern

Description

AndAlso : Expr -> (Expr * Expr) option

Recognizes expressions of the form a && b.

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

Recognizes expressions that represent the application of a (possibly curried or tupled) first class function value.

Bool : Expr -> bool option

Recognizes constant Boolean expressions.

Byte : Expr -> byte option

Recognizes constant byte expressions.

Char : Expr -> char option

Recognizes constant Unicode character expressions.

Double : Expr -> float option

Recognizes constant 64-bit floating point number expressions.

Int16 : Expr -> int16 option

Recognizes constant int16 expressions.

Int32 : Expr -> int32 option

Recognizes constant int32 expressions.

Int64 : Expr -> int64 option

Recognizes constant int64 expressions.

Lambdas : Expr -> (Var list list * Expr) option

Recognizes expressions that represent a (possibly curried or tupled) first class function value.

MethodWithReflectedDefinition : MethodBase -> Expr option

Recognizes methods that have an associated ReflectedDefinition.

OrElse : Expr -> (Expr * Expr) option

Recognizes expressions of the form a || b.

PropertyGetterWithReflectedDefinition : PropertyInfo -> Expr option

Recognizes property getters or values in modules that have an associated ReflectedDefinition.

PropertySetterWithReflectedDefinition : PropertyInfo -> Expr option

Recognizes property setters that have an associated ReflectedDefinition.

SByte : Expr -> sbyte option

Recognizes constant signed byte expressions.

Single : Expr -> single option

Recognizes constant 32-bit floating point number expressions.

SpecificCall : Expr -> Expr -> (Expr option * Type list * Expr list) option

A parameterized active pattern to recognize calls to a specified function or method. The returned elements are the optional target object (present if the target is an instance method), the generic type instantiation (non-empty if the target is a generic instantiation), and the arguments to the function or method.

String : Expr -> string option

Recognizes constant string expressions.

UInt16 : Expr -> uint16 option

Recognizes constant unsigned int16 expressions.

UInt32 : Expr -> uint32 option

Recognizes constant unsigned int32 expressions.

UInt64 : Expr -> uint64 option

Recognizes constant unsigned int64 expressions.

Unit : Expr -> unit option

Recognizes () constant expressions.

Platforms

Windows 8, Windows 7, Windows Server 2012, Windows Server 2008 R2

Version Information

F# Core Library Versions

Supported in: 2.0, 4.0, Portable

See Also

Reference

Microsoft.FSharp.Quotations Namespace (F#)