Header menu logo F# Compiler Guide

PatternContext Type

Union cases

Union case Description

NamedUnionCaseField(fieldName, caseIdRange)

Full Usage: NamedUnionCaseField(fieldName, caseIdRange)

Parameters:
    fieldName : string
    caseIdRange : range

Completing union case field pattern (e.g. fun (Some (Value = v| )) -> )

fieldName : string
caseIdRange : range

Other

Full Usage: Other

Any other position in a pattern that does not need special handling

PositionalUnionCaseField(fieldIndex, isTheOnlyField, caseIdRange)

Full Usage: PositionalUnionCaseField(fieldIndex, isTheOnlyField, caseIdRange)

Parameters:
    fieldIndex : int option - Position in the tuple. None if there is no tuple, with only one field outside of parentheses - `Some v|`
    isTheOnlyField : bool - True when completing the first field in the tuple and no other field is bound - `Case (a|)` but not `Case (a|, b)`
    caseIdRange : range - Range of the case identifier

Completing union case field pattern (e.g. fun (Some v| ) -> ) or fun (Some (v| )) -> ). In theory, this could also be parameterized active pattern usage.

fieldIndex : int option

Position in the tuple. None if there is no tuple, with only one field outside of parentheses - `Some v|`

isTheOnlyField : bool

True when completing the first field in the tuple and no other field is bound - `Case (a|)` but not `Case (a|, b)`

caseIdRange : range

Range of the case identifier

RecordFieldIdentifier referencedFields

Full Usage: RecordFieldIdentifier referencedFields

Parameters:
    referencedFields : (string * range) list

Completing a record field identifier in a pattern (e.g. fun { Field1 = a; Fie| } -> )

referencedFields : (string * range) list

UnionCaseFieldIdentifier(referencedFields, caseIdRange)

Full Usage: UnionCaseFieldIdentifier(referencedFields, caseIdRange)

Parameters:
    referencedFields : string list
    caseIdRange : range

Completing union case field identifier in a pattern (e.g. fun (Case (field1 = a; fie| )) -> )

referencedFields : string list
caseIdRange : range

Instance members

Instance member Description

this.IsNamedUnionCaseField

Full Usage: this.IsNamedUnionCaseField

Returns: bool
Returns: bool

this.IsOther

Full Usage: this.IsOther

Returns: bool
Returns: bool

this.IsPositionalUnionCaseField

Full Usage: this.IsPositionalUnionCaseField

Returns: bool
Returns: bool

this.IsRecordFieldIdentifier

Full Usage: this.IsRecordFieldIdentifier

Returns: bool
Returns: bool

this.IsUnionCaseFieldIdentifier

Full Usage: this.IsUnionCaseFieldIdentifier

Returns: bool
Returns: bool

Type something to start searching.