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

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.

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 (requires (static member DivideByInt : ^T * Microsoft.FSharp.Core.int -> ^T))

Divides a value by an integer.

x : ^T

The input value.

y : int

The input int.

Returns: ^T

The division result.

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 (requires enum<'T>)

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 (requires enum<'T>)

Get the underlying value for an enum value

enum : 'Enum

The input enum.

Returns: 'T

The enumeration as a value.

FastGenericComparer

Full Usage: FastGenericComparer

Returns: IComparer<'T>
Modifiers: inline
Type parameters: 'T (requires comparison)

Make an F# comparer object for the given type

Returns: IComparer<'T>

FastGenericEqualityComparer

Full Usage: FastGenericEqualityComparer

Returns: IEqualityComparer<'T>
Modifiers: inline
Type parameters: 'T (requires equality)

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 (requires equality)

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 (requires comparison)

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 (requires comparison)

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 (requires equality)

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 (requires equality)

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 (requires equality)

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 (requires comparison)

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 (requires comparison)

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 (requires comparison)

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 (requires comparison)

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 (requires comparison)

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 (requires comparison)

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 (requires (static member get_One : -> ^T))

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

Returns: ^T

GenericZero

Full Usage: GenericZero

Returns: ^T
Modifiers: inline
Type parameters: ^T (requires (static member get_Zero : -> ^T))

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

Returns: ^T

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.

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 (requires not struct)

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 (requires not struct)

The physical hash. Hashes on the object identity.

obj : 'T

The input object.

Returns: int

The hashed value.

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.

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.

Type something to start searching.