Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/Compiler/Symbols/Symbols.fs
Original file line number Diff line number Diff line change
Expand Up @@ -2410,6 +2410,13 @@ type FSharpType(cenv, ty:TType) =
| TType_app _ | TType_measure (Measure.Const _ | Measure.Prod _ | Measure.Inv _ | Measure.One) -> true
| _ -> false

member _.IsMeasureType =
isResolved() &&
protect <| fun () ->
match stripTyparEqns ty with
| TType_measure _ -> true
| _ -> false

member _.IsTupleType =
isResolved() &&
protect <| fun () ->
Expand Down
3 changes: 3 additions & 0 deletions src/Compiler/Symbols/Symbols.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -1073,6 +1073,9 @@ type FSharpType =
/// Get the generic arguments for a tuple type, a function type or a type constructed using a named entity
member GenericArguments: IList<FSharpType>

/// Indicates if the type is a measure type.
member IsMeasureType: bool

/// Indicates if the type is a tuple type (reference or struct). The GenericArguments property returns the elements of the tuple type.
member IsTupleType: bool

Expand Down