[Home] Module Microsoft.FSharp.Quotations.Raw


Quoted expressions and operations related to them. These expressions trees are dynamically annotated with type information which is dynamically checked for consistency.

Modules (as contributed by assembly 'FSharp.Core')

ModuleDescription
Microsoft.FSharp.Quotations.Raw.BindingStructure
Microsoft.FSharp.Quotations.Raw.Unchecked Contains construction functions that don't perform type-checking

Type Definitions

TypeDescription
type RawArgSaver For internal use only.

Values

ValueDescription
val ( <@@ @@> ) : Template<'c,'b> -> 'b
ASCII syntax for raw expression quotation. If there are holes in the expression then 'b is a function type that is used produced to generate new terms. For example, if there are no holes then 'b is always just 'Expr'. If there is one hole, then 'b is Expr -> Expr.
val ( <@@. .@@> ) : Template<'a,'b> -> Template<'a,'b>
ASCII syntax for raw expression template quotation.
val ( |AnyTopDefnUse|_| ) : Expr -> (TopDefnData * Type list) option
Recognize unapplied occurrences of module-bound values or functions (i.e. those defined using 'let' or 'let rec')
val ( |Apps| ) : Expr -> Expr * Expr list
Recognize an iterated series of function applications f x1 ... xN
val ( |App|_| ) : Expr -> (Expr * Expr) option
Recognize expression applications
val ( |Bool|_| ) : Expr -> bool option
Recognize constant boolean expressions
val ( |Byte|_| ) : Expr -> byte option
val ( |Char|_| ) : Expr -> char option
Recognize constant unicode character expressions
val ( |Coerce|_| ) : Expr -> (Type * Expr) option
Recognize coercion expressions, resulting from implicit coercions at object-model calls and explicit coercions elsewhere.
val ( |Cond|_| ) : Expr -> (Expr * Expr * Expr) option
Recognize 'if ... then ... else' expressions
val ( |CtorCall|_| ) : Expr -> (ConstructorInfo * Expr list) option
Recognize new-object calls to constructors in the .NET obejct model
val ( |Double|_| ) : Expr -> float option
Recognize constant 64-bit floating point number expressions
val ( |EncodedForLoop|_| ) : Expr -> (Expr * Expr * Expr) option
Recognize for-loop expressions, where the body of the for-loop is encoded as a lambda.
val ( |EncodedWhileLoop|_| ) : Expr -> (Expr * Expr) option
Recognize while-loop expressions, where the body of the loop is encoded as a lambda.
val ( |Equality|_| ) : Expr -> (Expr * Expr) option
Recognize equality tests, resulting primarily from the compilation of pattern matching
val ( |FieldGet|_| ) : Expr -> (FieldInfo * Expr) option
Recognize .NET IL field-fetches in the .NET object model
val ( |GenericTopDefnApp|_| ) : Expr -> (Expr -> (Type list * Expr list) option)
Recognize expressions corresponding to uses and applications of a particular known module-bound value or function (i.e. one defined using 'let' or 'let rec'). e.g. GenericTopDefnApp (<@ List.map @>) will recognize (<@ List.map string_of_int [1;2] @>) as an application of the map function to types [(type int); (type string)] and arguments (<@ string_of_int @>) ad [<@ 1;2 @>].
val ( |GenericTopDefnUse|_| ) : Expr -> (Expr -> Type list option)
Recognize expressions corresponding to uses of a particular known module-bound value or function (i.e. one defined using 'let' or 'let rec'). e.g. GenericTopDefnUse (<@ List.map @>) will recognize (<@ List.map : (string -> int) -%gt; string list -> int list l@>) as an application of the map function to types [(type int); (type string)].
val ( |GetAddr|_| ) : Expr -> Expr option
Recognize address-access expressions.
val ( |Hole|_| ) : Expr -> Type option
Recognize expressions representing holes in quotation templates
val ( |Int16|_| ) : Expr -> int16 option
val ( |Int32|_| ) : Expr -> int32 option
val ( |Int64|_| ) : Expr -> int64 option
val ( |Lambdas| ) : Expr -> ExprVar list * Expr
Recognize an iterated series of lambdas abstractions
val ( |Lambda|_| ) : Expr -> (ExprVar * Expr) option
Recognize lambda (abstraction) expressions
val ( |LazyAnd|_| ) : Expr -> (Expr * Expr) option
Recognize the encoded form of 'a && b'
val ( |LazyOr|_| ) : Expr -> (Expr * Expr) option
Recognize the encoded form of 'a || b'
val ( |LetRec|_| ) : Expr -> ((ExprVar * Expr) list * Expr) option
Recognize recursives expressions associated with 'let rec' constructs
val ( |Let|_| ) : Expr -> ((ExprVar * Expr) * Expr) option
Recognize expressions associated with 'let' constructs
val ( |LiftedValue|_| ) : Expr -> (obj * Type) option
Recognize expressions made up of arbitrary reified (lifted) values
val ( |MethodCall|_| ) : Expr -> (MethodInfo * Expr list) option
Recognize calls to the .NET obejct model, excluding property accesses etc.
val ( |NewArray|_| ) : Expr -> (Type * Expr list) option
Recognize array construction expressions
val ( |NewDelegate|_| ) : Expr -> (Type * Expr) option
Recognize calls to construct delegate values in the .NET obejct model
val ( |PropGet|_| ) : Expr -> (PropertyInfo * Expr) option
Recognize calls to property accessors or field-fetches in the .NET object model
val ( |Quote|_| ) : Expr -> Expr option
Recognize quoted expressions (for inner quotations)
val ( |RecdGet|_| ) : Expr -> (Type * string * Expr) option
Recognize record-access expressions
val ( |RecdSet|_| ) : Expr -> (Type * string * Expr * Expr) option
Recognize record-access expressions
val ( |Recd|_| ) : Expr -> (Type * Expr list) option
Recognize record-construction expressions
val ( |ResolvedMethodDefn|_| ) : #MethodBase -> Expr option
Attempt to resolve a method definition to an implementation.
val ( |ResolvedTopDefnUse|_| ) : Expr -> (TopDefnData * Expr) option
Attempt to resolve a module-bound value or function (i.e. those defined using 'let' or 'let rec') to an implementation. If the value or function is generic then appropriate type arguments must also be specified.
val ( |ResolvedTopDefn|_| ) : TopDefnData * Type list -> Expr option
Attempt to resolve a module-bound value or function (i.e. those defined using 'let' or 'let rec') to an implementation. If the value or function is generic then appropriate type arguments must also be specified.
val ( |SByte|_| ) : Expr -> sbyte option
Recognize constant signed 8-bit integers
val ( |Seq|_| ) : Expr -> (Expr * Expr) option
Recognize sequence expressions "a;b"
val ( |Single|_| ) : Expr -> float32 option
Recognize constant 32-bit floating point number expressions
val ( |String|_| ) : Expr -> string option
Recognize constant string expressions
val ( |SumFieldGet|_| ) : Expr -> (Type * string * int * Expr) option
Recognize discriminated-union access expressions, resulting primarily from the compilation of pattern matches
val ( |SumTagTest|_| ) : Expr -> (Type * string * Expr) option
Recognize discriminated-union discrimination test expressions, resulting primarily from the compilation of pattern matches
val ( |Sum|_| ) : Expr -> (Type * string * Expr list) option
Recognize discriminated-union construction expressions
val ( |Template|_| ) : Template<'rawqty,'rawfty> -> (Expr -> 'rawqty option)
Match an existing raw expression against the given raw expression template
val ( |TopDefnApp|_| ) : Expr -> (Expr -> Expr list option)
Recognize expressions corresponding to uses and applications of a particular known module-bound value or function (i.e. one defined using 'let' or 'let rec'). e.g. TopDefnApp (<@ string_of_int @>) will recognize (<@ string_of_int 3 @>) as an application. This function may be used with top level generic definitions, but the types arguments to the generic definition will not be returned. If the type arguments are relevant then use GenericTopDefnApp instead.
val ( |TupleGet|_| ) : Expr -> (Type * int * Expr) option
Recognize tuple access expressions
val ( |Tuple|_| ) : Expr -> (Type * Expr list) option
Recognize tuple-expressions
val ( |UInt16|_| ) : Expr -> uint16 option
val ( |UInt32|_| ) : Expr -> uint32 option
val ( |UInt64|_| ) : Expr -> uint64 option
val ( |Unit|_| ) : Expr -> unit option
Recognize 'unit' constant expressions
val ( |Var|_| ) : Expr -> ExprVarName option
Recognize variable expressions
val ( ~%% ) : 'a -> Expr
val ( ~@@ ) : 'a -> Expr
val ExplicitlyRegisterTopDefs : Assembly -> string -> byte [] -> unit
Permit interactive environments such as F# Interactive to explicitly register new pickled resources that represent persisted top level definitions. The string indicates a unique name for the resources being added.
val MkAnyTopDefnUse : TopDefnData * Type list -> Expr
Build expressions that are constants referring to top-level public definitions, where the constants may generic and applied to a number of type arguments.
val MkApp : Expr * Expr -> Expr
Build expression applications
val MkApps : (Expr * Expr list) -> Expr
Build an iterated series of function applications f x1 ... xN
val MkBool : bool -> Expr
Build constant boolean expressions
val MkByte : byte -> Expr
val MkChar : char -> Expr
Build constant unicode character expressions
val MkCoerce : Type * Expr -> Expr
Build coercion expressions, resulting from implicit coercions at object-model calls and explicit coercions elsewhere.
val MkCond : Expr * Expr * Expr -> Expr
Build 'if ... then ... else' expressions
val MkCtorCall : ConstructorInfo * Expr list -> Expr
Build new-object calls to constructors in the .NET obejct model
val MkDouble : float -> Expr
Build constant 64-bit floating point number expressions
val MkEncodedForLoop : Expr * Expr * Expr -> Expr
Build for-loop expressions, where the body of the for-loop is encoded as a lambda.
val MkEncodedWhileLoop : Expr * Expr -> Expr
Build while-loop expressions, where the body of the loop is encoded as a lambda.
val MkEquality : Expr * Expr -> Expr
Build equality tests, resulting primarily from the compilation of pattern matching
val MkFieldGet : FieldInfo * Expr -> Expr
Build .NET IL field-fetches in the .NET object model
val MkGenericTopDefnApp : Expr -> (Type list * Expr list -> Expr)
Build expressions corresponding to uses and applications of a particular known top level generic definition. e.g. MkGenericTopDefnApp (<@ List.map @>) ([(type int); (type string)], [<@ 1;2 @>]
val MkGenericTopDefnUse : Expr -> (Type list -> Expr)
Build expressions corresponding to uses of a particular known top level generic value. e.g. MkGenericTopDefnUse (<@ List.map @>) [(type int); (type string)]
val MkGetAddr : Expr -> Expr
Build address-access expressions.
val MkHole : Type -> Expr
Build holes in quotation templates
val MkInt16 : int16 -> Expr
val MkInt32 : int32 -> Expr
val MkInt64 : int64 -> Expr
val MkLambda : ExprVar * Expr -> Expr
Build lambda (abstraction) expressions
val MkLambdas : (ExprVar list * Expr) -> Expr
Build an iterated series of lambdas abstractions
val MkLet : (ExprVar * Expr) * Expr -> Expr
Build expressions associated with 'let' constructs
val MkLetRec : (ExprVar * Expr) list * Expr -> Expr
Build recursives expressions associated with 'let rec' constructs
val MkLiftedValue : obj * Type -> Expr
Build expressions made up of arbitrary reified (lifted) values
val MkMethodCall : MethodInfo * Expr list -> Expr
Build calls to the .NET obejct model, excluding property accesses etc.
val MkNamedType : Type * Type list -> Type
val MkNewArray : Type * Expr list -> Expr
Build array construction expressions
val MkNewDelegate : Type * Expr -> Expr
Build calls to construct delegate values in the .NET obejct model
val MkPropGet : PropertyInfo * Expr -> Expr
Build calls to property accessors or field-fetches in the .NET object model
val MkQuote : Expr -> Expr
Build quoted expressions (for inner quotations)
val MkRecd : Type * Expr list -> Expr
Build record-construction expressions
val MkRecdGet : Type * string * Expr -> Expr
Build record-access expressions
val MkRecdSet : Type * string * Expr * Expr -> Expr
Build record-access expressions
val MkSByte : sbyte -> Expr
Build constant signed 8-bit integers
val MkSeq : Expr * Expr -> Expr
Build sequence expressions "a;b"
val MkSingle : float32 -> Expr
Build constant 32-bit floating point number expressions
val MkString : string -> Expr
Build constant string expressions
val MkSum : Type * string * Expr list -> Expr
Build discriminated-union construction expressions
val MkSumFieldGet : Type * string * int * Expr -> Expr
Build discriminated-union access expressions, resulting primarily from the compilation of pattern matches
val MkSumTagTest : Type * string * Expr -> Expr
Build discriminated-union discrimination test expressions, resulting primarily from the compilation of pattern matches
val MkTemplate : Template<'rawqty,'rawfty> -> ('rawqty -> Expr)
Match an existing raw expression against the given expression template
val MkTuple : Type * Expr list -> Expr
Build tuple-expressions
val MkTupleGet : Type * int * Expr -> Expr
Build tuple access expressions
val MkUInt16 : uint16 -> Expr
val MkUInt32 : uint32 -> Expr
val MkUInt64 : uint64 -> Expr
val MkUnit : unit -> Expr
Build 'unit' constant expressions
val MkVar : ExprVarName -> Expr
Build variable expressions
val PickledDefinitionsResourceNameBase : string
Files compiled with --quotation-data persist definitions to the emitted assembly ('cross stage persistence of level 0 definitions'). They are saved as a resource in the emitted module. This is the base name for the resources.
val ResolveMethodDefn : #MethodBase -> Expr option
Attempt to resolve a method definition to an implementation.
val ResolveTopDefinition : TopDefnData * Type list -> Expr option
Attempt to resolve a module-bound value or function (i.e. those defined using 'let' or 'let rec') to an implementation. If the value or function is generic then appropriate type arguments must also be specified.
val Unpickle : Type -> byte [] -> Template<'a,'b>
This function is called automatically when quotation syntax (<@@ @@>) and related raw-expression quotations are used. The bytes are a pickled binary representation of an unlinke form of the qutoed expression, and the System.Type argument is any type in the assembly where the quoted expression occurs, i.e. it helps scope the interpretation of the cross-assembly references in the bytes.

Deprecated Values

ValueDescription
[<Obsolete
  ("This function is included in this API for demonstration purposes and will be removed in a future release")>]
val DeepMacroExpandUntil : (Expr -> bool) -> Expr -> Expr

Note: This function is included in this API for demonstration purposes and will be removed in a future release

Perform macro expansion (deep call-by-value reduction) on an expression. Lambda applications are beta-reduced after reducing the function term and the argument term. Top-level definitions are expanded according to any top definition data that is available via ResolveTopDefinition. The interior bodies of lambda expressions are expanded. Reduction rules for unions, records, arithmetic etc. are not applied. A cutoff that halts the rewriting for expressions that pass the given test (usually a test for inclusion within a particular 'target' langauge). This function is mainly included for demonstration purposes and should not be used in production quotation processing.

See Also

Microsoft.FSharp.Quotations


Documentation for assembly FSharp.Core, version 1.9.4.19, generated using F# version 1.9.4.19