Skip to content

Commit 2247ea9

Browse files
authored
Add FS-1017 (#91)
1 parent 07264f9 commit 2247ea9

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

spec/rfc-status.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
| F# 4.1 | FS-1014 | [Struct Discriminated Unions](https://github.com/fsharp/fslang-design/tree/main/FSharp-4.1/FS-1014-struct-discriminated-unions.md) | [completed](https://github.com/fsharp/fslang-spec/pull/90) |
2727
| F# 4.1 | FS-1015 | [Support for fixed](https://github.com/fsharp/fslang-design/tree/main/FSharp-4.1/FS-1015-support-for-fixed.md) | [completed](https://github.com/fsharp/fslang-spec/pull/65) |
2828
| F# 4.1 | FS-1016 | [Unreserve Keywords](https://github.com/fsharp/fslang-design/tree/main/FSharp-4.1/FS-1016-unreserve-keywords.md) | [completed](https://github.com/fsharp/fslang-spec/pull/63) |
29-
| F# 4.1 | FS-1017 | [Fix SRTP Constraint Parsing](https://github.com/fsharp/fslang-design/tree/main/FSharp-4.1/FS-1017-fix-srtp-constraint-parsing.md) | |
29+
| F# 4.1 | FS-1017 | [Fix SRTP Constraint Parsing](https://github.com/fsharp/fslang-design/tree/main/FSharp-4.1/FS-1017-fix-srtp-constraint-parsing.md) | [completed](https://github.com/fsharp/fslang-spec/pull/91) |
3030
| F# 4.1 | FS-1018 | [Adjust Extensions Method Scope](https://github.com/fsharp/fslang-design/tree/main/FSharp-4.1/FS-1018-adjust-extensions-method-scope.md) | |
3131
| F# 4.1 | FS-1019 | [Implicitly Add the Module Suffix](https://github.com/fsharp/fslang-design/tree/main/FSharp-4.1/FS-1019-implicitly-add-the-module-suffix.md) | [completed](https://github.com/fsharp/fslang-spec/pull/77) |
3232
| F# 4.1 | FS-1020 | [ByRef Returns](https://github.com/fsharp/fslang-design/tree/main/FSharp-4.1/FS-1020-byref-returns.md) | |

spec/types-and-type-constraints.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ typar-constraints :=
8383
when constraint and ... and constraint
8484
8585
static-typars :=
86-
'^' ident
87-
'(' '^' ident or ... or '^' ident ')'
86+
type
87+
'(' type or ... or type ')'
8888
```
8989

9090
In a type instantiation, the type name and the opening angle bracket must be syntactically adjacent
@@ -322,7 +322,7 @@ Nullness constraints also arise from expressions of the form `null`.
322322
An _explicit member constraint_ has the following form:
323323

324324
```fsgrammar
325-
'(' typar or ... or typar ')' ':' '(' member-sig ')'
325+
static-typars ':' '(' member-sig ')'
326326
```
327327

328328
For example, the F# library defines the + operator with the following signature:
@@ -338,9 +338,7 @@ correspond to parameters `^a`, `^b`, and `^c`. If these are named types, then ei
338338

339339
In addition:
340340

341-
- Each `typar` must be a statically resolved type variable (see [§](types-and-type-constraints.md#variable-types)) in the form `^ident`. This ensures
342-
that the constraint is resolved at compile time against a corresponding named type. It also
343-
means that generic code cannot use this constraint unless that code is marked inline (see [§](inference-procedures.md#generalization)).
341+
- The types in the support set can be statically resolved type variables (see[§](types-and-type-constraints.md#variable-types)) in the form `^ident`, or concrete types. The use of statically resolved type variables ensures that the constraint is resolved at compile time against a corresponding named type. It also means that generic code cannot use this constraint unless that code is marked inline (see [§](inference-procedures.md#generalization)).
344342
- The `member-sig` cannot be generic; that is, it cannot include explicit type parameter definitions.
345343
- The conditions that govern when a type satisfies a member constraint are specified in (see [§](inference-procedures.md#solving-member-constraints)).
346344

0 commit comments

Comments
 (0)