Qit


AnyType Type

Type used in pattern matching to allow for wildcard type matching. See also Quote.any and Quote.withType.

Example

The following example shows how to use the AnyType type to match a list of any type.

 match <@ [] : int list @> with 
 | Quote <@ [] : AnyType list @> -> printfn "Matched!"
 | _ -> printfn "No Match!"
Multiple items
val int: value: 'T -> int (requires member op_Explicit)

--------------------
type int = int32

--------------------
type int<'Measure> = int
type 'T list = List<'T>
val printfn: format: Printf.TextWriterFormat<'T> -> 'T

Example

Basic operator overloads allow to match generally over certain operators.

 match <@ 23.0 + 2.0 @> with 
 | Quote <@ Quote.any "a" + Quote.any "b" @> -> printfn "Matched!"
 | _ -> printfn "No Match!"
val printfn: format: Printf.TextWriterFormat<'T> -> 'T

Constructors

Constructor Description

AnyType()

Full Usage: AnyType()

Returns: AnyType
Returns: AnyType

Static members

Static member Description

a &&& arg1

Full Usage: a &&& arg1

Parameters:
Returns: AnyType
a : AnyType
arg1 : AnyType
Returns: AnyType

a * arg1

Full Usage: a * arg1

Parameters:
Returns: AnyType
a : AnyType
arg1 : AnyType
Returns: AnyType

a + arg1

Full Usage: a + arg1

Parameters:
Returns: AnyType
a : AnyType
arg1 : AnyType
Returns: AnyType

a - arg1

Full Usage: a - arg1

Parameters:
Returns: AnyType
a : AnyType
arg1 : AnyType
Returns: AnyType

a / arg1

Full Usage: a / arg1

Parameters:
Returns: AnyType
a : AnyType
arg1 : AnyType
Returns: AnyType

a <<< arg1

Full Usage: a <<< arg1

Parameters:
Returns: AnyType
a : AnyType
arg1 : AnyType
Returns: AnyType

a ||| arg1

Full Usage: a ||| arg1

Parameters:
Returns: AnyType
a : AnyType
arg1 : AnyType
Returns: AnyType