Does FSI deal well with multi module/file F# projects? Consider the following project:
module.fs:
module Xyz
let add x y = x + y
Program.fs:
module Program
open Xyz
let result = add 1 2
selecting and running the last 2 lines of Program.fs
will yield the following FSI error:
Program.fs: error FS0039: The namespace or module 'Xyz' is not defined
What is the problem here?
So, let's say I have the following project structure:
A.fs
B.fs
C.fs
D.fs
E.fs
I want to run some functions of E.fs
. E.fs
makes use of all the other .fs
files, so I have one open
for each one of them. If later on I want to also run some code from any one of the other files, I'll have to repeat the process fo any file that was not #loaded
before.
From your suggestions, it seems like to make my E.fs
file run on FSI I'll either have to create a separate .fsx file or have a separate
#if INTERACTIVE
#load "..."
for each module I'll use which is IMO quite redundant. Am I missing something here, or is this a clear violation of both KISS and DRY principles?