俺の判別共有体にもValueプロパティを入れたい

F#に組み込まれてるoption型だと

> let x = Some 33;;

val x : int option = Some 33

> x.Value;;
val it : int = 33

というようにValueプロパティを使ってその"中の変数"にアクセスできるわけですが、
以下のように俺俺判別共有体を使うと

> type Hoge = Hoge of int;;

type Hoge = | Hoge of int

> let x = Hoge 33;;

val x : Hoge = Hoge 33

> x.Value;;

  x.Value;;
  --^^^^^

C:\Users\teramonagi\AppData\Local\Temp\stdin(6,3): error FS0039: The field, constructor or member 'Value' is not defined

というわけで、当然ないぞと。で、こいつをどうやって実装しようかなと考えた時に

> type Hoge with
    member this.Value = match this with Hoge x -> x;;

type Hoge with
  member Value : int

> x.Value;;
val it : int = 33

なんて書いてみたわけだが、そういえばOption型ではどうやって実装されているのかなと調べた所、

GitHub - fsharp/fsharp: The F# Compiler, Core Library & Tools (F# Software Foundation Repository)の「src/fsharp/FSharp.Core/prim-types.fs」の中で

type Option<'T> =
| None : 'T option
| Some : Value:'T -> 'T option

[]
member x.Value = match x with Some x -> x | None -> raise (new System.InvalidOperationException("Option.Value"))

となっていたのでたぶんこれが常套手段なのだろう。