Is there a way to get a structured output of the result of type inference by the F# compiler?
(I am trying to build a small IDE).
Assuming you have a file test.fs, you can use the following command to generate F# Signature File test.fsi, which contains type information about all top-level definitions:
Fsc.exe --sig:test.fsi test.fs
To get information about local variables, you'll need to use the F# compiler as a service. There is a simple command-line example that demonstrates how to call the API and you can also explore the F# binding for MonoDevelop.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With