Printing F# discriminated union

前端 未结 3 756
迷失自我
迷失自我 2021-01-04 22:43

I am writing a F# program which parses a string into a AST type which is a discriminated union.

When I use fsi (on Mono + Mac OS X) to run my code, the

3条回答
  •  情歌与酒
    2021-01-04 23:43

    Have you tried printfn "%A" ast? The %A specifier takes into consideration the StructuredFormatDisplayAttribute[MSDN], if present.

提交回复
热议问题