This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open System.Text | |
open Microsoft.FSharp.Reflection | |
let printDu du = | |
let rec inner (builder: StringBuilder, duValue: obj, duType: Type) = | |
if not (FSharpType.IsUnion duType) then failwith "FU!" | |
let case, values = FSharpValue.GetUnionFields(duValue, duType) |