How to generate the F# type signature similar to FSI in my own code?

后端 未结 2 480
余生分开走
余生分开走 2021-01-02 04:26

If one uses the F# Interactive Shell (FSI), the inferred expression type (signature) is printed to the console along with its value:

val it : int * string *          


        
2条回答
  •  孤城傲影
    2021-01-02 05:11

    If you look at the F# compiler code and see how the --sig option is handled by the compiler I think that will get you what you're looking for. More about the --sig option and signatures here:

    Signatures (F#)

提交回复
热议问题