I don't understand how to work with F# header files.
I have two test files:
Foo.fs:
module Foo
let add a b = a + b
Program.fs:
open Foo
printfn "%d" (add 8 2)
In the file Program.fs, Visual Studio tells me:
Files located in libraries or applications containing multiple files must start with a namespace or module declaration. Only the last source file of an application can omit such a statement.
However, I did the right thing: start my Foo.fs file with a module declaration. If I declare a namespace or module to Program.fs, the error persists. So I don't have access to the add
function.
How do I import this file?