I suggest we ...

Support Provided Union and Record Types

111 votes
Vote
Sign in
(thinking…)
Password icon
Signed in as (Sign out)
You have left! (?) (thinking…)
Gustavo Guerra shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

Marking as “approved in principle” (it will show as “planned”).

However, in reality it is both relatively low priority and relatively hard to implement, so I don’t expect this to happen any time soon.

For example, we would have to reverse-map the metadata associated with F#-specific types. This is already done in F# reflection FSharpType.IsRecord and so on.

4 comments

Sign in
(thinking…)
Password icon
Signed in as (Sign out)
Submitting...
  • Don Syme commented  ·   ·  Flag as inappropriate

    I plan to mark this feature as "approved in principle" (it will show as "planned"). It would be great if it were done.

    However, in reality it is both relatively low priority and relatively hard to implement, so I don't expect this to happen any time soon.

    For example, we would have to reverse-map the metadata associated with F#-specific types. This is already done in F# reflection FSharpType.IsRecord and so on.

  • mavnn commented  ·   ·  Flag as inappropriate

    Yes please for this one; let's allow TPs to create idiomatic F# apis!

  • Keith Battocchi commented  ·   ·  Flag as inappropriate

    @Jack - it's a compiler limitation (there's no way to provide the metadata that the F# compiler uses to recognize F#-specific types).

  • Jack Pappas commented  ·   ·  Flag as inappropriate

    What limits you from generating DUs and Records in type providers now? Is the limitation in the F# compiler itself, or in the ubiquitous ProvidedTypes.fs? If it's the latter, this feature could be implemented through a community effort.

F# Language

Feedback and Knowledge Base