Possibly wrong pattern for `union-type-case-data` in spec
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 55/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- fsharp
- Domain
- documentation
Research direction
Start by locating the source for page 139 of the type-definition section and compare the documented union-type-case-data grammar with the compiling and failing examples in the issue. Update the grammar so the function type case matches the required syntax, then verify that the rendered specification reflects the correction.
Written by the indexing model from the issue text.
Description
On a page 139 (8. Type definition) possible union cases listed as follow:
union-type-case-data :=
ident --null union case
ident of union-type-field * ... * union-type-field --n-ary union case
ident : uncurried-sig --n-ary union case
uncurried-sig :=
args-spec -> type
args-spec :=
arg-spec * ... * arg-spec
But this one doesn't compile:
type Test =
| A
| B of int*int
| C : int->int
with error:
Return types of union cases must be identical to the type being defined, up to abbreviations
This construct is deprecated: it is only for use in the F# library
But this one is correct:
type Test =
| A
| B of int*int
| C of (int->int) //parentheses are required
So probably union-type-case-data should look like:
union-type-case-data :=
ident --null union case
ident of union-type-field * ... * union-type-field --n-ary union case
ident of (uncurried-sig) --n-ary union case
- Dominant language
- TeX
- Stars
- 311
- Forks
- 291
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from fsharp/fsharp.org
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
fsharp/fsharp.org#1026 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
fsharp/fsharp.org#1021 · 2 comments · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
fsharp/fsharp.org#1024 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 58/100
fsharp/fsharp.org#1023 · 2 comments ·
-
N/A Open
Difficulty 5/5 Over a week Newbie friendliness 1/100
fsharp/fsharp.org#1019 ·
All issues in fsharp/fsharp.org
Similar issues
-
Area: Excel support
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
orbeon/orbeon-forms#7893 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
docToolchain/docToolchain#1705 ·
-
kb-infra-drift
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
OCHA-DAP/ds-knowledge-base#653 · 1 comment ·
-
area/dev-productivity area/disaster-recovery area/ipcei kind/enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
namespace operations
Difficulty 1/5 Under an hour Newbie friendliness 90/100
EclipseFdn/open-vsx.org#13419 ·