Header menu logo F# Compiler Guide

SynConst Type

The unchecked abstract syntax tree of constants in F# types and expressions.

Union cases

Union case Description

Bool bool

Full Usage: Bool bool

Parameters:
    Item : bool

F# syntax: true, false

Item : bool

Byte byte

Full Usage: Byte byte

Parameters:
    Item : byte

F# syntax: 13uy, 0x40uy, 0oFFuy, 0b0111101uy

Item : byte

Bytes(bytes, synByteStringKind, range)

Full Usage: Bytes(bytes, synByteStringKind, range)

Parameters:

F# syntax: verbatim or regular byte string, e.g. "abc"B. Also used internally in the typechecker once an array of unit16 constants is detected, to allow more efficient processing of large arrays of uint16 constants.

bytes : byte[]
synByteStringKind : SynByteStringKind
range : range

Char char

Full Usage: Char char

Parameters:
    Item : char

F# syntax: 'a'

Item : char

Decimal Decimal

Full Usage: Decimal Decimal

Parameters:

F# syntax: 23.4M

Item : Decimal

Double double

Full Usage: Double double

Parameters:
    Item : double

F# syntax: 1.30, 1.40e10 etc.

Item : double

Int16 int16

Full Usage: Int16 int16

Parameters:
    Item : int16

F# syntax: 13s, 0x4000s, 0o0777s, 0b0111101s

Item : int16

Int32 int32

Full Usage: Int32 int32

Parameters:
    Item : int32

F# syntax: 13, 0x4000, 0o0777

Item : int32

Int64 int64

Full Usage: Int64 int64

Parameters:
    Item : int64

F# syntax: 13L

Item : int64

IntPtr int64

Full Usage: IntPtr int64

Parameters:
    Item : int64

F# syntax: 13n

Item : int64

Measure(constant, constantRange, synMeasure, trivia)

Full Usage: Measure(constant, constantRange, synMeasure, trivia)

Parameters:

Old comment: "we never iterate, so the const here is not another SynConst.Measure"

constant : SynConst
constantRange : range
synMeasure : SynMeasure
trivia : SynMeasureConstantTrivia

SByte sbyte

Full Usage: SByte sbyte

Parameters:
    Item : sbyte

F# syntax: 13y, 0xFFy, 0o077y, 0b0111101y

Item : sbyte

Single single

Full Usage: Single single

Parameters:
    Item : single

F# syntax: 1.30f, 1.40e10f etc.

Item : single

SourceIdentifier(constant, value, range)

Full Usage: SourceIdentifier(constant, value, range)

Parameters:
    constant : string
    value : string
    range : range

Source Line, File, and Path Identifiers Containing both the original value as the evaluated value.

constant : string
value : string
range : range

String(text, synStringKind, range)

Full Usage: String(text, synStringKind, range)

Parameters:

F# syntax: verbatim or regular string, e.g. "abc"

text : string
synStringKind : SynStringKind
range : range

UInt16 uint16

Full Usage: UInt16 uint16

Parameters:
    Item : uint16

F# syntax: 13us, 0x4000us, 0o0777us, 0b0111101us

Item : uint16

UInt16s uint16[]

Full Usage: UInt16s uint16[]

Parameters:
    Item : uint16[]

Used internally in the typechecker once an array of unit16 constants is detected, to allow more efficient processing of large arrays of uint16 constants.

Item : uint16[]

UInt32 uint32

Full Usage: UInt32 uint32

Parameters:
    Item : uint32

F# syntax: 13u, 0x4000u, 0o0777u

Item : uint32

UInt64 uint64

Full Usage: UInt64 uint64

Parameters:
    Item : uint64

F# syntax: 13UL

Item : uint64

UIntPtr uint64

Full Usage: UIntPtr uint64

Parameters:
    Item : uint64

F# syntax: 13un

Item : uint64

Unit

Full Usage: Unit

F# syntax: ()

UserNum(value, suffix)

Full Usage: UserNum(value, suffix)

Parameters:
    value : string
    suffix : string

UserNum(value, suffix) F# syntax: 1Q, 1Z, 1R, 1N, 1G

value : string
suffix : string

Instance members

Instance member Description

this.IsBool

Full Usage: this.IsBool

Returns: bool
Returns: bool

this.IsByte

Full Usage: this.IsByte

Returns: bool
Returns: bool

this.IsBytes

Full Usage: this.IsBytes

Returns: bool
Returns: bool

this.IsChar

Full Usage: this.IsChar

Returns: bool
Returns: bool

this.IsDecimal

Full Usage: this.IsDecimal

Returns: bool
Returns: bool

this.IsDouble

Full Usage: this.IsDouble

Returns: bool
Returns: bool

this.IsInt16

Full Usage: this.IsInt16

Returns: bool
Returns: bool

this.IsInt32

Full Usage: this.IsInt32

Returns: bool
Returns: bool

this.IsInt64

Full Usage: this.IsInt64

Returns: bool
Returns: bool

this.IsIntPtr

Full Usage: this.IsIntPtr

Returns: bool
Returns: bool

this.IsMeasure

Full Usage: this.IsMeasure

Returns: bool
Returns: bool

this.IsSByte

Full Usage: this.IsSByte

Returns: bool
Returns: bool

this.IsSingle

Full Usage: this.IsSingle

Returns: bool
Returns: bool

this.IsSourceIdentifier

Full Usage: this.IsSourceIdentifier

Returns: bool
Returns: bool

this.IsString

Full Usage: this.IsString

Returns: bool
Returns: bool

this.IsUInt16

Full Usage: this.IsUInt16

Returns: bool
Returns: bool

this.IsUInt16s

Full Usage: this.IsUInt16s

Returns: bool
Returns: bool

this.IsUInt32

Full Usage: this.IsUInt32

Returns: bool
Returns: bool

this.IsUInt64

Full Usage: this.IsUInt64

Returns: bool
Returns: bool

this.IsUIntPtr

Full Usage: this.IsUIntPtr

Returns: bool
Returns: bool

this.IsUnit

Full Usage: this.IsUnit

Returns: bool
Returns: bool

this.IsUserNum

Full Usage: this.IsUserNum

Returns: bool
Returns: bool

this.Range

Full Usage: this.Range

Parameters:
Returns: range

Gets the syntax range of this construct

dflt : range
Returns: range

Type something to start searching.