-
Notifications
You must be signed in to change notification settings - Fork 6k
Add documentation for empty/marker interfaces in F# #49048
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: BillWagner <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is ready for final review, with one suggestion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds comprehensive documentation for empty/marker interfaces in F#, addressing a gap in the official documentation where this important feature was undocumented and difficult to discover.
- Added a new documentation section explaining empty/marker interface concepts and syntax
- Created a complete code example demonstrating implementation in both record and class types
- Positioned the new content logically within the existing interfaces documentation
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
File | Description |
---|---|
docs/fsharp/language-reference/interfaces.md | Added new section "Define empty or marker interfaces" with explanation and code reference |
samples/snippets/fsharp/lang-ref-1/snippet2806.fs | Created F# code example showing empty interface definition and implementation patterns |
Comments suppressed due to low confidence (1)
docs/fsharp/language-reference/interfaces.md:1
- Missing required 'ai-usage' frontmatter key for AI-generated content. Add
ai-usage: ai-assisted
to the frontmatter section since this content was created with AI assistance.
---
Fixes #41953
This PR adds documentation explaining how to define and implement empty (marker) interfaces in F#, which was previously undocumented and difficult to discover.
Changes
New Section Added
Added a new section titled "Implementing empty or marker interfaces" to the F# interfaces documentation (
docs/fsharp/language-reference/interfaces.md
). The section:interface end
syntax for defining empty interfacesCode Example
Created
samples/snippets/fsharp/lang-ref-1/snippet2806.fs
with a complete example showing:Placement
The new section is positioned logically after "Implementing Interfaces by Using Class Types" and before "Calling Interface Methods", as it relates directly to interface implementation techniques.
This documentation will help F# developers who need to use empty interfaces for marking or categorizing types without requiring specific behavior implementations.
Original prompt
Fixes #27656
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.
Internal previews