Header menu logo FSharp.Core

LanguagePrimitives Module

Language primitives associated with the F# language

Nested modules

Modules Description

ErrorStrings

For compiler use only

HashCompare

The F# compiler emits calls to some of the functions in this module as part of the compiled form of some language constructs

IntrinsicFunctions

The F# compiler emits calls to some of the functions in this module as part of the compiled form of some language constructs

IntrinsicOperators

The F# compiler emits calls to some of the functions in this module as part of the compiled form of some language constructs

Functions and values

Function or value Description

AdditionDynamic x y

Full Usage: AdditionDynamic x y

Parameters:
    x : 'T1
    y : 'T2

Returns: 'U

A compiler intrinsic that implements dynamic invocations to the '+' operator.

x : 'T1
y : 'T2
Returns: 'U

BitwiseAndDynamic x y

Full Usage: BitwiseAndDynamic x y

Parameters:
    x : 'T1
    y : 'T2

Returns: 'U

A compiler intrinsic that implements dynamic invocations to the '&&&' operator.

x : 'T1
y : 'T2
Returns: 'U

BitwiseOrDynamic x y

Full Usage: BitwiseOrDynamic x y

Parameters:
    x : 'T1
    y : 'T2

Returns: 'U

A compiler intrinsic that implements dynamic invocations to the '|||' operator.

x : 'T1
y : 'T2
Returns: 'U

ByteWithMeasure input

Full Usage: ByteWithMeasure input

Parameters:
    input : byte - The input byte.

Returns: byte<'Measure> The byte with units-of-measure.
Modifiers: inline
Type parameters: 'Measure

Creates a byte value with units-of-measure

input : byte

The input byte.

Returns: byte<'Measure>

The byte with units-of-measure.

CheckedAdditionDynamic x y

Full Usage: CheckedAdditionDynamic x y

Parameters:
    x : 'T1
    y : 'T2

Returns: 'U

A compiler intrinsic that implements dynamic invocations to the checked '+' operator.

x : 'T1
y : 'T2
Returns: 'U

CheckedExplicitDynamic value

Full Usage: CheckedExplicitDynamic value

Parameters:
    value : 'T

Returns: 'U

A compiler intrinsic that implements dynamic invocations related to checked conversion operators.

value : 'T
Returns: 'U

CheckedMultiplyDynamic x y

Full Usage: CheckedMultiplyDynamic x y

Parameters:
    x : 'T1
    y : 'T2

Returns: 'U

A compiler intrinsic that implements dynamic invocations to the checked '*' operator.

x : 'T1
y : 'T2
Returns: 'U

CheckedSubtractionDynamic x y

Full Usage: CheckedSubtractionDynamic x y

Parameters:
    x : 'T1
    y : 'T2

Returns: 'U

A compiler intrinsic that implements dynamic invocations to the checked '-' operator.

x : 'T1
y : 'T2
Returns: 'U

CheckedUnaryNegationDynamic value

Full Usage: CheckedUnaryNegationDynamic value

Parameters:
    value : 'T

Returns: 'U

A compiler intrinsic that implements dynamic invocations to the checked unary '-' operator.

value : 'T
Returns: 'U

DecimalWithMeasure input

Full Usage: DecimalWithMeasure input

Parameters:
    input : decimal - The input decimal.

Returns: decimal<'Measure> The decimal with units of measure.
Modifiers: inline
Type parameters: 'Measure

Creates a decimal value with units-of-measure

input : decimal

The input decimal.

Returns: decimal<'Measure>

The decimal with units of measure.

DivideByInt x y

Full Usage: DivideByInt x y

Parameters:
    x : ^T - The input value.
    y : int - The input int.

Returns: ^T The division result.
Modifiers: inline
Type parameters: ^T

Divides a value by an integer.

x : ^T

The input value.

y : int

The input int.

Returns: ^T

The division result.

DivideByIntDynamic x y

Full Usage: DivideByIntDynamic x y

Parameters:
    x : 'T
    y : int

Returns: 'T

A compiler intrinsic that implements dynamic invocations for the DivideByInt primitive.

x : 'T
y : int
Returns: 'T

DivisionDynamic x y

Full Usage: DivisionDynamic x y

Parameters:
    x : 'T1
    y : 'T2

Returns: 'U

A compiler intrinsic that implements dynamic invocations to the '/' operator.

x : 'T1
y : 'T2
Returns: 'U

EnumOfValue value

Full Usage: EnumOfValue value

Parameters:
    value : 'T - The input value.

Returns: 'Enum The value as an enumeration.
Modifiers: inline
Type parameters: 'T, 'Enum

Build an enum value from an underlying value

value : 'T

The input value.

Returns: 'Enum

The value as an enumeration.

EnumToValue enum

Full Usage: EnumToValue enum

Parameters:
    enum : 'Enum - The input enum.

Returns: 'T The enumeration as a value.
Modifiers: inline
Type parameters: 'Enum, 'T

Get the underlying value for an enum value

enum : 'Enum

The input enum.

Returns: 'T

The enumeration as a value.

EqualityDynamic x y

Full Usage: EqualityDynamic x y

Parameters:
    x : 'T1
    y : 'T2

Returns: 'U

A compiler intrinsic that implements dynamic invocations related to the '=' operator.

x : 'T1
y : 'T2
Returns: 'U

ExclusiveOrDynamic x y

Full Usage: ExclusiveOrDynamic x y

Parameters:
    x : 'T1
    y : 'T2

Returns: 'U

A compiler intrinsic that implements dynamic invocations related to the '^^^' operator.

x : 'T1
y : 'T2
Returns: 'U

ExplicitDynamic value

Full Usage: ExplicitDynamic value

Parameters:
    value : 'T

Returns: 'U

A compiler intrinsic that implements dynamic invocations related to conversion operators.

value : 'T
Returns: 'U

FastGenericComparer

Full Usage: FastGenericComparer

Returns: IComparer<'T>
Modifiers: inline
Type parameters: 'T

Make an F# comparer object for the given type

Returns: IComparer<'T>

FastGenericComparerFromTable

Full Usage: FastGenericComparerFromTable

Returns: IComparer<'T>

Make an F# comparer object for the given type

Returns: IComparer<'T>

FastGenericEqualityComparer

Full Usage: FastGenericEqualityComparer

Returns: IEqualityComparer<'T>
Modifiers: inline
Type parameters: 'T

Make an F# hash/equality object for the given type

Returns: IEqualityComparer<'T>

FastGenericEqualityComparerFromTable

Full Usage: FastGenericEqualityComparerFromTable

Returns: IEqualityComparer<'T>

Make an F# hash/equality object for the given type

Returns: IEqualityComparer<'T>

FastLimitedGenericEqualityComparer limit

Full Usage: FastLimitedGenericEqualityComparer limit

Parameters:
    limit : int - The input limit on the number of nodes.

Returns: IEqualityComparer<'T> System.Collections.Generic.IEqualityComparer<'T>
Modifiers: inline
Type parameters: 'T

Make an F# hash/equality object for the given type using node-limited hashing when hashing F# records, lists and union types.

limit : int

The input limit on the number of nodes.

Returns: IEqualityComparer<'T>

System.Collections.Generic.IEqualityComparer<'T>

Float32WithMeasure input

Full Usage: Float32WithMeasure input

Parameters:
    input : float32 - The input float.

Returns: float32<'Measure> The float with units-of-measure.
Modifiers: inline
Type parameters: 'Measure

Creates a float32 value with units-of-measure

input : float32

The input float.

Returns: float32<'Measure>

The float with units-of-measure.

FloatWithMeasure input

Full Usage: FloatWithMeasure input

Parameters:
    input : float - The input float.

Returns: float<'Measure> The float with units-of-measure.
Modifiers: inline
Type parameters: 'Measure

Creates a float value with units-of-measure

input : float

The input float.

Returns: float<'Measure>

The float with units-of-measure.

GenericComparer

Full Usage: GenericComparer

Returns: IComparer

A static F# comparer object

Returns: IComparer

GenericComparison e1 e2

Full Usage: GenericComparison e1 e2

Parameters:
    e1 : 'T - The first value.
    e2 : 'T - The second value.

Returns: int The result of the comparison.
Modifiers: inline
Type parameters: 'T

Compare two values

e1 : 'T

The first value.

e2 : 'T

The second value.

Returns: int

The result of the comparison.

GenericComparisonWithComparer comp e1 e2

Full Usage: GenericComparisonWithComparer comp e1 e2

Parameters:
    comp : IComparer - The function to compare the values.
    e1 : 'T - The first value.
    e2 : 'T - The second value.

Returns: int The result of the comparison.
Modifiers: inline
Type parameters: 'T

Compare two values. May be called as a recursive case from an implementation of System.IComparable to ensure consistent NaN comparison semantics.

comp : IComparer

The function to compare the values.

e1 : 'T

The first value.

e2 : 'T

The second value.

Returns: int

The result of the comparison.

GenericEquality e1 e2

Full Usage: GenericEquality e1 e2

Parameters:
    e1 : 'T - The first value.
    e2 : 'T - The second value.

Returns: bool The result of the comparison.
Modifiers: inline
Type parameters: 'T

Compare two values for equality using partial equivalence relation semantics ([nan] <> [nan])

e1 : 'T

The first value.

e2 : 'T

The second value.

Returns: bool

The result of the comparison.

GenericEqualityComparer

Full Usage: GenericEqualityComparer

Returns: IEqualityComparer
Return an F# comparer object suitable for hashing and equality. This hashing behaviour
 of the returned comparer is not limited by an overall node count when hashing F#
 records, lists and union types.
Returns: IEqualityComparer

GenericEqualityER e1 e2

Full Usage: GenericEqualityER e1 e2

Parameters:
    e1 : 'T - The first value.
    e2 : 'T - The second value.

Returns: bool The result of the comparison.
Modifiers: inline
Type parameters: 'T

Compare two values for equality using equivalence relation semantics ([nan] = [nan])

e1 : 'T

The first value.

e2 : 'T

The second value.

Returns: bool

The result of the comparison.

GenericEqualityERComparer

Full Usage: GenericEqualityERComparer

Returns: IEqualityComparer
Return an F# comparer object suitable for hashing and equality. This hashing behaviour
 of the returned comparer is not limited by an overall node count when hashing F#
 records, lists and union types. This equality comparer has equivalence 
 relation semantics ([nan] = [nan]).
Returns: IEqualityComparer

GenericEqualityWithComparer comp e1 e2

Full Usage: GenericEqualityWithComparer comp e1 e2

Parameters:
Returns: bool The result of the comparison.
Modifiers: inline
Type parameters: 'T

Compare two values for equality

comp : IEqualityComparer

e1 : 'T

The first value.

e2 : 'T

The second value.

Returns: bool

The result of the comparison.

GenericGreaterOrEqual e1 e2

Full Usage: GenericGreaterOrEqual e1 e2

Parameters:
    e1 : 'T - The first value.
    e2 : 'T - The second value.

Returns: bool The result of the comparison.
Modifiers: inline
Type parameters: 'T

Compare two values

e1 : 'T

The first value.

e2 : 'T

The second value.

Returns: bool

The result of the comparison.

GenericGreaterThan e1 e2

Full Usage: GenericGreaterThan e1 e2

Parameters:
    e1 : 'T - The first value.
    e2 : 'T - The second value.

Returns: bool The result of the comparison.
Modifiers: inline
Type parameters: 'T

Compare two values

e1 : 'T

The first value.

e2 : 'T

The second value.

Returns: bool

The result of the comparison.

GenericHash obj

Full Usage: GenericHash obj

Parameters:
    obj : 'T - The input object.

Returns: int The hashed value.
Modifiers: inline
Type parameters: 'T

Hash a value according to its structure. This hash is not limited by an overall node count when hashing F# records, lists and union types.

obj : 'T

The input object.

Returns: int

The hashed value.

GenericHashWithComparer comparer obj

Full Usage: GenericHashWithComparer comparer obj

Parameters:
    comparer : IEqualityComparer - The comparison function.
    obj : 'T - The input object.

Returns: int The hashed value.
Modifiers: inline
Type parameters: 'T

Recursively hash a part of a value according to its structure.

comparer : IEqualityComparer

The comparison function.

obj : 'T

The input object.

Returns: int

The hashed value.

GenericLessOrEqual e1 e2

Full Usage: GenericLessOrEqual e1 e2

Parameters:
    e1 : 'T - The first value.
    e2 : 'T - The second value.

Returns: bool The result of the comparison.
Modifiers: inline
Type parameters: 'T

Compare two values

e1 : 'T

The first value.

e2 : 'T

The second value.

Returns: bool

The result of the comparison.

GenericLessThan e1 e2

Full Usage: GenericLessThan e1 e2

Parameters:
    e1 : 'T - The first value.
    e2 : 'T - The second value.

Returns: bool The result of the comparison.
Modifiers: inline
Type parameters: 'T

Compare two values

e1 : 'T

The first value.

e2 : 'T

The second value.

Returns: bool

The result of the comparison.

GenericLimitedHash limit obj

Full Usage: GenericLimitedHash limit obj

Parameters:
    limit : int - The limit on the number of nodes.
    obj : 'T - The input object.

Returns: int The hashed value.
Modifiers: inline
Type parameters: 'T

Hash a value according to its structure. Use the given limit to restrict the hash when hashing F# records, lists and union types.

limit : int

The limit on the number of nodes.

obj : 'T

The input object.

Returns: int

The hashed value.

GenericMaximum e1 e2

Full Usage: GenericMaximum e1 e2

Parameters:
    e1 : 'T - The first value.
    e2 : 'T - The second value.

Returns: 'T The maximum value.
Modifiers: inline
Type parameters: 'T

Take the maximum of two values structurally according to the order given by GenericComparison

e1 : 'T

The first value.

e2 : 'T

The second value.

Returns: 'T

The maximum value.

GenericMinimum e1 e2

Full Usage: GenericMinimum e1 e2

Parameters:
    e1 : 'T - The first value.
    e2 : 'T - The second value.

Returns: 'T The minimum value.
Modifiers: inline
Type parameters: 'T

Take the minimum of two values structurally according to the order given by GenericComparison

e1 : 'T

The first value.

e2 : 'T

The second value.

Returns: 'T

The minimum value.

GenericOne

Full Usage: GenericOne

Returns: ^T
Modifiers: inline
Type parameters: ^T

Resolves to the value 'one' for any primitive numeric type or any type with a static member called 'One'

Returns: ^T

GenericOneDynamic ()

Full Usage: GenericOneDynamic ()

Parameters:
Returns: 'T

Resolves to the value 'one' for any primitive numeric type or any type with a static member called 'One'.

() : unit
Returns: 'T

GenericZero

Full Usage: GenericZero

Returns: ^T
Modifiers: inline
Type parameters: ^T

Resolves to the zero value for any primitive numeric type or any type with a static member called 'Zero'

Returns: ^T

GenericZeroDynamic ()

Full Usage: GenericZeroDynamic ()

Parameters:
Returns: 'T

Resolves to the zero value for any primitive numeric type or any type with a static member called 'Zero'.

() : unit
Returns: 'T

GreaterThanDynamic x y

Full Usage: GreaterThanDynamic x y

Parameters:
    x : 'T1
    y : 'T2

Returns: 'U

A compiler intrinsic that implements dynamic invocations related to the '>' operator.

x : 'T1
y : 'T2
Returns: 'U

GreaterThanOrEqualDynamic x y

Full Usage: GreaterThanOrEqualDynamic x y

Parameters:
    x : 'T1
    y : 'T2

Returns: 'U

A compiler intrinsic that implements dynamic invocations related to the '>=' operator.

x : 'T1
y : 'T2
Returns: 'U

InequalityDynamic x y

Full Usage: InequalityDynamic x y

Parameters:
    x : 'T1
    y : 'T2

Returns: 'U

A compiler intrinsic that implements dynamic invocations related to the '=' operator.

x : 'T1
y : 'T2
Returns: 'U

Int16WithMeasure input

Full Usage: Int16WithMeasure input

Parameters:
    input : int16 - The input int16.

Returns: int16<'Measure> The int16 with units-of-measure.
Modifiers: inline
Type parameters: 'Measure

Creates an int16 value with units-of-measure

input : int16

The input int16.

Returns: int16<'Measure>

The int16 with units-of-measure.

Int32WithMeasure input

Full Usage: Int32WithMeasure input

Parameters:
    input : int - The input int.

Returns: int<'Measure> The int with units of measure.
Modifiers: inline
Type parameters: 'Measure

Creates an int32 value with units-of-measure

input : int

The input int.

Returns: int<'Measure>

The int with units of measure.

Int64WithMeasure input

Full Usage: Int64WithMeasure input

Parameters:
    input : int64 - The input int64.

Returns: int64<'Measure> The int64 with units of measure.
Modifiers: inline
Type parameters: 'Measure

Creates an int64 value with units-of-measure

input : int64

The input int64.

Returns: int64<'Measure>

The int64 with units of measure.

IntPtrWithMeasure input

Full Usage: IntPtrWithMeasure input

Parameters:
Returns: nativeint<'Measure> The nativeint with units-of-measure.
Modifiers: inline
Type parameters: 'Measure

Creates a nativeint value with units-of-measure

input : nativeint

The input nativeint.

Returns: nativeint<'Measure>

The nativeint with units-of-measure.

LeftShiftDynamic value shift

Full Usage: LeftShiftDynamic value shift

Parameters:
    value : 'T1
    shift : 'T2

Returns: 'U

A compiler intrinsic that implements dynamic invocations to the '<<<' operator.

value : 'T1
shift : 'T2
Returns: 'U

LessThanDynamic x y

Full Usage: LessThanDynamic x y

Parameters:
    x : 'T1
    y : 'T2

Returns: 'U

A compiler intrinsic that implements dynamic invocations related to the '<' operator.

x : 'T1
y : 'T2
Returns: 'U

LessThanOrEqualDynamic x y

Full Usage: LessThanOrEqualDynamic x y

Parameters:
    x : 'T1
    y : 'T2

Returns: 'U

A compiler intrinsic that implements dynamic invocations related to the '<=' operator.

x : 'T1
y : 'T2
Returns: 'U

LogicalNotDynamic value

Full Usage: LogicalNotDynamic value

Parameters:
    value : 'T

Returns: 'U

A compiler intrinsic that implements dynamic invocations related to the '~~~' operator.

value : 'T
Returns: 'U

ModulusDynamic x y

Full Usage: ModulusDynamic x y

Parameters:
    x : 'T1
    y : 'T2

Returns: 'U

A compiler intrinsic that implements dynamic invocations to the '%' operator.

x : 'T1
y : 'T2
Returns: 'U

MultiplyDynamic x y

Full Usage: MultiplyDynamic x y

Parameters:
    x : 'T1
    y : 'T2

Returns: 'U

A compiler intrinsic that implements dynamic invocations to the '*' operator.

x : 'T1
y : 'T2
Returns: 'U

ParseInt32 s

Full Usage: ParseInt32 s

Parameters:
    s : string - The input string.

Returns: int32 The parsed value.

Parse an int32 according to the rules used by the overloaded 'int32' conversion operator when applied to strings

s : string

The input string.

Returns: int32

The parsed value.

ParseInt64 s

Full Usage: ParseInt64 s

Parameters:
    s : string - The input string.

Returns: int64 The parsed value.

Parse an int64 according to the rules used by the overloaded 'int64' conversion operator when applied to strings

s : string

The input string.

Returns: int64

The parsed value.

ParseUInt32 s

Full Usage: ParseUInt32 s

Parameters:
    s : string - The input string.

Returns: uint32 The parsed value.

Parse an uint32 according to the rules used by the overloaded 'uint32' conversion operator when applied to strings

s : string

The input string.

Returns: uint32

The parsed value.

ParseUInt64 s

Full Usage: ParseUInt64 s

Parameters:
    s : string - The input string.

Returns: uint64 The parsed value.

Parse an uint64 according to the rules used by the overloaded 'uint64' conversion operator when applied to strings

s : string

The input string.

Returns: uint64

The parsed value.

PhysicalEquality e1 e2

Full Usage: PhysicalEquality e1 e2

Parameters:
    e1 : 'T - The first value.
    e2 : 'T - The second value.

Returns: bool The result of the comparison.
Modifiers: inline
Type parameters: 'T

Reference/physical equality. True if the inputs are reference-equal, false otherwise.

e1 : 'T

The first value.

e2 : 'T

The second value.

Returns: bool

The result of the comparison.

PhysicalHash obj

Full Usage: PhysicalHash obj

Parameters:
    obj : 'T - The input object.

Returns: int The hashed value.
Modifiers: inline
Type parameters: 'T

The physical hash. Hashes on the object identity.

obj : 'T

The input object.

Returns: int

The hashed value.

RightShiftDynamic value shift

Full Usage: RightShiftDynamic value shift

Parameters:
    value : 'T1
    shift : 'T2

Returns: 'U

A compiler intrinsic that implements dynamic invocations to the '>>>' operator.

value : 'T1
shift : 'T2
Returns: 'U

SByteWithMeasure input

Full Usage: SByteWithMeasure input

Parameters:
    input : sbyte - The input sbyte.

Returns: sbyte<'Measure> The sbyte with units-of-measure.
Modifiers: inline
Type parameters: 'Measure

Creates an sbyte value with units-of-measure

input : sbyte

The input sbyte.

Returns: sbyte<'Measure>

The sbyte with units-of-measure.

SubtractionDynamic x y

Full Usage: SubtractionDynamic x y

Parameters:
    x : 'T1
    y : 'T2

Returns: 'U

A compiler intrinsic that implements dynamic invocations to the '-' operator.

x : 'T1
y : 'T2
Returns: 'U

UInt16WithMeasure input

Full Usage: UInt16WithMeasure input

Parameters:
    input : uint16 - The input uint16.

Returns: uint16<'Measure> The uint16 with units-of-measure.
Modifiers: inline
Type parameters: 'Measure

Creates a uint16 value with units-of-measure

input : uint16

The input uint16.

Returns: uint16<'Measure>

The uint16 with units-of-measure.

UInt32WithMeasure input

Full Usage: UInt32WithMeasure input

Parameters:
    input : uint - The input uint.

Returns: uint<'Measure> The uint with units-of-measure.
Modifiers: inline
Type parameters: 'Measure

Creates a uint value with units-of-measure

input : uint

The input uint.

Returns: uint<'Measure>

The uint with units-of-measure.

UInt64WithMeasure input

Full Usage: UInt64WithMeasure input

Parameters:
    input : uint64 - The input uint64.

Returns: uint64<'Measure> The uint64 with units-of-measure.
Modifiers: inline
Type parameters: 'Measure

Creates a uint64 value with units-of-measure

input : uint64

The input uint64.

Returns: uint64<'Measure>

The uint64 with units-of-measure.

UIntPtrWithMeasure input

Full Usage: UIntPtrWithMeasure input

Parameters:
Returns: unativeint<'Measure> The unativeint with units-of-measure.
Modifiers: inline
Type parameters: 'Measure

Creates a unativeint value with units-of-measure

input : unativeint

The input unativeint.

Returns: unativeint<'Measure>

The unativeint with units-of-measure.

UnaryNegationDynamic value

Full Usage: UnaryNegationDynamic value

Parameters:
    value : 'T

Returns: 'U

A compiler intrinsic that implements dynamic invocations to the unary '-' operator.

value : 'T
Returns: 'U

Type something to start searching.