【发布时间】:2015-02-09 03:14:24
【问题描述】:
我有一个 fsx 文件,用于对我的项目进行交互式开发。它预加载了所有的 dll,而且我想模拟几个在 FSI 世界中表现不同的函数。
在 fsx 我有这个代码:
// #r needed dlls
open FSharp.Charting
module InteractiveUtil =
let plotMe (c : ChartTypes.GenericChart) = c.ShowChart() |> ignore
let logMe (c : string) = c |> printfn "%s"
现在在我想玩的 .fs 文件中,我有这个:
#if INTERACTIVE
#load "LiveInvestigationPreload.fsx"
open InteractiveUtil
#endif
但是当我尝试执行上面的 sn-p 时,我得到了
错误 FS0039:未定义命名空间或模块“InteractiveUtil”
我还注意到 InteractiveUtil 模块的定义如下所示:
namespace FSI_0009
module InteractiveUtil = begin
val plotMe : c:FSharp.Charting.ChartTypes.GenericChart -> unit
val logMe : c:string -> unit
end
所以 FSI_0009 是 fsi 为我创建的。
知道如何解决这个问题吗?
【问题讨论】:
标签: f#