Condividi tramite


Core.LanguagePrimitives Module (F#)

Language primitives associated with the F# language

Namespace/Module Path: Microsoft.FSharp.Core

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

module LanguagePrimitives

Modules

Module

Description

module ErrorStrings

For internal use only

module HashCompare

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

module IntrinsicFunctions

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

module IntrinsicOperators

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

Values

Value

Description

AdditionDynamic : 'T1 -> 'T2 -> 'U

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

CheckedAdditionDynamic : 'T1 -> 'T2 -> 'U

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

CheckedMultiplyDynamic : 'T1 -> 'T2 -> 'U

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

DecimalWithMeasure : decimal -> decimal<'u>

Creates a decimal value with units-of-measure

DivideByInt : ^T -> int -> ^T

Divides a value by an integer.

DivideByIntDynamic : 'T -> int -> 'T

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

EnumOfValue : 'T -> enum

Creates an enumeration value from an underlying value.

EnumToValue : 'Enum -> 'T

Gets the underlying value for an enumeration value.

FastGenericComparer : IComparer<'T>

Creates an F# comparer object for the given type

FastGenericEqualityComparer : IEqualityComparer<'T>

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

FastLimitedGenericEqualityComparer : int -> IEqualityComparer<'T>

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

Float32WithMeasure : float -> float<'u>

Creates a float32 value with units-of-measure.

FloatWithMeasure : float32 -> float32<'u>

Creates a float value with units-of-measure.

GenericComparer : IComparer

A static F# comparer object.

GenericComparison : 'T -> 'T -> int

Compares two values.

GenericComparisonWithComparer : IComparer -> 'T -> 'T -> int

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

GenericEquality : 'T -> 'T -> bool

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

GenericEqualityComparer : IEqualityComparer

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

GenericEqualityER : 'T -> 'T -> bool

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

GenericEqualityERComparer : IEqualityComparer

Return an F# comparer object suitable for hashing and equality. This hashing behavior 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]).

GenericEqualityWithComparer : IEqualityComparer -> 'T -> 'T -> bool

Compare two values for equality

GenericGreaterOrEqual : 'T -> 'T -> bool

Compares two values

GenericGreaterThan: 'T -> 'T -> bool

Compares two values

GenericHash : 'T -> int

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

GenericHashWithComparer : IEqualityComparer -> 'T -> int

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

GenericLessOrEqual : 'T -> 'T -> bool

Compares two values

GenericLessThan : 'T -> 'T -> bool

Compares two values

GenericLimitedHash: int -> 'T -> int

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

GenericMaximum : 'T -> 'T -> 'T

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

GenericMinimum : 'T -> 'T -> 'T

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

GenericOne: ^T

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

GenericOneDynamic : unit -> 'T

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

GenericZero : ^T

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

GenericZeroDynamic: unit -> 'T

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

Int16WithMeasure : int16 -> int16<'u>

Creates an int16 value with units-of-measure

Int32WithMeasure : int32 -> int32<'u>

Creates an int32 value with units-of-measure

Int64WithMeasure : int64 -> int64<'u>

Creates an int64 value with units-of-measure

MultiplyDynamic : 'T1 -> 'T2 -> 'U

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

ParseInt32 : string -> int32

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

ParseInt64 : string -> int64

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

ParseUInt32 : string -> uint32

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

ParseUInt64 : string -> uint64

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

PhysicalEquality: 'T -> 'T -> bool

Reference/physical equality. True if boxed versions of the inputs are reference-equal, OR if both are primitive numeric types and the implementation of Equals for the type of the first argument returns true on the boxed versions of the inputs.

PhysicalHash: 'T -> int

The physical hash. Hashes on the object identity, except for value types, where we hash on the contents.

SByteWithMeasure: sbyte -> sbyte<'u>

Creates an sbyte value with units-of-measure

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.Core Namespace (F#)