Header menu logo F# Compiler Guide

SynType Type

Represents a syntax tree for F# types

Union cases

Union case Description

Anon range

Full Usage: Anon range

Parameters:

F# syntax: _

range : range

AnonRecd(isStruct, fields, range)

Full Usage: AnonRecd(isStruct, fields, range)

Parameters:

F# syntax: {| id: type; ...; id: type |} F# syntax: struct {| id: type; ...; id: type |}

isStruct : bool
fields : (Ident * SynType) list
range : range

App(typeName, lessRange, typeArgs, commaRanges, greaterRange, isPostfix, range)

Full Usage: App(typeName, lessRange, typeArgs, commaRanges, greaterRange, isPostfix, range)

Parameters:
 F# syntax: type or type type or (type, ..., type) type
   isPostfix: indicates a postfix type application e.g. "int list" or "(int, string) dict"
typeName : SynType
lessRange : range option
typeArgs : SynType list
commaRanges : range list
greaterRange : range option
isPostfix : bool
range : range

Array(rank, elementType, range)

Full Usage: Array(rank, elementType, range)

Parameters:

F# syntax: type[]

rank : int
elementType : SynType
range : range

FromParseError range

Full Usage: FromParseError range

Parameters:

A type arising from a parse error

range : range

Fun(argType, returnType, range, trivia)

Full Usage: Fun(argType, returnType, range, trivia)

Parameters:

F# syntax: type -> type

argType : SynType
returnType : SynType
range : range
trivia : SynTypeFunTrivia

HashConstraint(innerType, range)

Full Usage: HashConstraint(innerType, range)

Parameters:

F# syntax: #type

innerType : SynType
range : range

Intersection(typar, types, range, trivia)

Full Usage: Intersection(typar, types, range, trivia)

Parameters:

F# syntax: x: #I1 & #I2 F# syntax: x: 't & #I1 & #I2 Shorthand for x: 't when 't :> I1 and 't :> I2

typar : SynTypar option
types : SynType list
range : range
trivia : SynTyparDeclTrivia

LongIdent longDotId

Full Usage: LongIdent longDotId

Parameters:

F# syntax: A.B.C

longDotId : SynLongIdent

LongIdentApp(typeName, longDotId, lessRange, typeArgs, commaRanges, greaterRange, range)

Full Usage: LongIdentApp(typeName, longDotId, lessRange, typeArgs, commaRanges, greaterRange, range)

Parameters:

F# syntax: type.A.B.C

typeName : SynType
longDotId : SynLongIdent
lessRange : range option
typeArgs : SynType list
commaRanges : range list
greaterRange : range option
range : range

MeasurePower(baseMeasure, exponent, range)

Full Usage: MeasurePower(baseMeasure, exponent, range)

Parameters:

F# syntax: for units of measure e.g. m^3, kg^1/2

baseMeasure : SynType
exponent : SynRationalConst
range : range

Or(lhsType, rhsType, range, trivia)

Full Usage: Or(lhsType, rhsType, range, trivia)

Parameters:

F# syntax: ^a or ^b, used in trait calls

lhsType : SynType
rhsType : SynType
range : range
trivia : SynTypeOrTrivia

Paren(innerType, range)

Full Usage: Paren(innerType, range)

Parameters:
innerType : SynType
range : range

SignatureParameter(attributes, optional, id, usedType, range)

Full Usage: SignatureParameter(attributes, optional, id, usedType, range)

Parameters:

F# syntax: a: b, used in signatures and type annotations

attributes : SynAttributes
optional : bool
id : Ident option
usedType : SynType
range : range

StaticConstant(constant, range)

Full Usage: StaticConstant(constant, range)

Parameters:

F# syntax: 1, "abc" etc, used in parameters to type providers For the dimensionless units i.e. 1, and static parameters to provided types

constant : SynConst
range : range

StaticConstantExpr(expr, range)

Full Usage: StaticConstantExpr(expr, range)

Parameters:

F# syntax: const expr, used in static parameters to type providers

expr : SynExpr
range : range

StaticConstantNamed(ident, value, range)

Full Usage: StaticConstantNamed(ident, value, range)

Parameters:

F# syntax: ident=1 etc., used in static parameters to type providers

ident : SynType
value : SynType
range : range

StaticConstantNull range

Full Usage: StaticConstantNull range

Parameters:

F# syntax: null, used in parameters to type providers

range : range

Tuple(isStruct, path, range)

Full Usage: Tuple(isStruct, path, range)

Parameters:

F# syntax: type * ... * type F# syntax: struct (type * ... * type)

isStruct : bool
path : SynTupleTypeSegment list
range : range

Var(typar, range)

Full Usage: Var(typar, range)

Parameters:

F# syntax: 'Var

typar : SynTypar
range : range

WithGlobalConstraints(typeName, constraints, range)

Full Usage: WithGlobalConstraints(typeName, constraints, range)

Parameters:

F# syntax: typ with constraints

typeName : SynType
constraints : SynTypeConstraint list
range : range

WithNull(innerType, ambivalent, range, trivia)

Full Usage: WithNull(innerType, ambivalent, range, trivia)

Parameters:
innerType : SynType
ambivalent : bool
range : range
trivia : SynTypeWithNullTrivia

Instance members

Instance member Description

this.IsAnon

Full Usage: this.IsAnon

Returns: bool
Returns: bool

this.IsAnonRecd

Full Usage: this.IsAnonRecd

Returns: bool
Returns: bool

this.IsApp

Full Usage: this.IsApp

Returns: bool
Returns: bool

this.IsArray

Full Usage: this.IsArray

Returns: bool
Returns: bool

this.IsFromParseError

Full Usage: this.IsFromParseError

Returns: bool
Returns: bool

this.IsFun

Full Usage: this.IsFun

Returns: bool
Returns: bool

this.IsHashConstraint

Full Usage: this.IsHashConstraint

Returns: bool
Returns: bool

this.IsIntersection

Full Usage: this.IsIntersection

Returns: bool
Returns: bool

this.IsLongIdent

Full Usage: this.IsLongIdent

Returns: bool
Returns: bool

this.IsLongIdentApp

Full Usage: this.IsLongIdentApp

Returns: bool
Returns: bool

this.IsMeasurePower

Full Usage: this.IsMeasurePower

Returns: bool
Returns: bool

this.IsOr

Full Usage: this.IsOr

Returns: bool
Returns: bool

this.IsParen

Full Usage: this.IsParen

Returns: bool
Returns: bool

this.IsSignatureParameter

Full Usage: this.IsSignatureParameter

Returns: bool
Returns: bool

this.IsStaticConstant

Full Usage: this.IsStaticConstant

Returns: bool
Returns: bool

this.IsStaticConstantExpr

Full Usage: this.IsStaticConstantExpr

Returns: bool
Returns: bool

this.IsStaticConstantNamed

Full Usage: this.IsStaticConstantNamed

Returns: bool
Returns: bool

this.IsStaticConstantNull

Full Usage: this.IsStaticConstantNull

Returns: bool
Returns: bool

this.IsTuple

Full Usage: this.IsTuple

Returns: bool
Returns: bool

this.IsVar

Full Usage: this.IsVar

Returns: bool
Returns: bool

this.IsWithGlobalConstraints

Full Usage: this.IsWithGlobalConstraints

Returns: bool
Returns: bool

this.IsWithNull

Full Usage: this.IsWithNull

Returns: bool
Returns: bool

this.Range

Full Usage: this.Range

Returns: range

Gets the syntax range of this construct

Returns: range

Type something to start searching.