Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

F# Spec doesn't mention private representation Discriminated unions

Open
#321 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Stale
Tech stack
fsharp
Domain
documentation

Research direction

Start with the F# language specification and the discriminated-union example in the issue. Determine the documented effect of private on the union representation, including C# constructor visibility, F# pattern matching, and union-case construction; done means the specification clearly states the intended behavior.

Written by the indexing model from the issue text.

Description

language-spec

For example, in this type:

  type HtmlAttribute = 
      private | HtmlAttribute of name:string * value:string    

What's the effect that private should have? I see that in C# projects, I no longer have the NewHtmlAttribute constructor, but I can keep doing pattern matching and create new values with HtmlAttribute("a", "b") in F#. Is that the intended behaviour? I was expecting to not be able to create new values using the union case constructor, and force people to use a static method that normalizes the arguments

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from fsharp/fsharp.org

All issues in fsharp/fsharp.org

Similar issues

More Documentation issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.