As Stephen said, if you write some unit tests for your code, unit tests will usually call a function with values ββof the type that the function needs to automatically verify the signature (if you change the signature, you wonβt be able to compile your tests).
Another option that is suitable for libraries is to use F # interface files ( .fsi ). The interface file defines the types of public functions in the implementation file ( .fs ), and this is also a good place for documentation.
If you (accidentally) change the type of your implementation, your code will not compile unless you update the type in the interface file.
You probably want to save the interface file manually (see F # library sources for a good example), but you can get the initial value by calling the compiler with --sig:mylibrary.fsi . You can probaby use this switch to automate testing (and test diff between signature files after each compilation).
source share