signature-files

Automated F# Signature File (.fsi) Generation

丶灬走出姿态 提交于 2020-01-01 04:54:35
问题 I am working on a project that has a number of modules that I'd like to apply access control constraints to. I'd also like to have my project contain additional documentation on the type signatures of each function. I know that I can accomplish both of these tasks very easily via F# signature files. However, my project is large and contains many files, and I need a convenient way of generating a signature file for each one. I have been successful in generating individual signature files via

Signature Files and Access Modifers in F#

╄→гoц情女王★ 提交于 2019-12-21 09:23:14
问题 I've recently been trying to learn the Object-Oriented aspects of F#, and have become curious about how to restrict access to types/modules in the language. More specifically, I want to know the difference between writing this: Example.fsi module Stack = val foo : string Example.fs module Stack = let foo = "foo" let bar = "bar" and alternatively this: module Stack = let foo = "foo" let private bar = "bar" Do they not accomplish exactly the same thing in the end? Coming from a C# background, I

F# signature file error

大兔子大兔子 提交于 2019-12-12 19:27:13
问题 I was trying to use a fsi file to allow mutually recursive classes in separate files, but my fsi file did not compile. Below is a simple example which demonstrates the problem. File program.fs: module mod1 type first = |zero = 0 File File1.fs: module mod2 type second = |zero2 = 0 Compiling with --sig:signature.fsi produces: #light module mod1 type first = | zero = 0 module mod2 type second = | zero2 = 0 Which has an error on the line type second Which is Error 1 Unexpected keyword 'type' in

Signature Files and Access Modifers in F#

风流意气都作罢 提交于 2019-12-04 03:26:38
I've recently been trying to learn the Object-Oriented aspects of F#, and have become curious about how to restrict access to types/modules in the language. More specifically, I want to know the difference between writing this: Example.fsi module Stack = val foo : string Example.fs module Stack = let foo = "foo" let bar = "bar" and alternatively this: module Stack = let foo = "foo" let private bar = "bar" Do they not accomplish exactly the same thing in the end? Coming from a C# background, I'm much inclined just to use the access modifiers over signature (FSI) files. They seem to be more

Automated F# Signature File (.fsi) Generation

感情迁移 提交于 2019-12-03 13:59:29
I am working on a project that has a number of modules that I'd like to apply access control constraints to. I'd also like to have my project contain additional documentation on the type signatures of each function. I know that I can accomplish both of these tasks very easily via F# signature files. However, my project is large and contains many files, and I need a convenient way of generating a signature file for each one. I have been successful in generating individual signature files via command line compilations using the --sig compiler option , but I am stuck on how to add compiler