F#编译FSharpChart:内联错误
|
我试图从http://blogs.msdn.com/b/dsyme/archive/2011/04/01/fsharpchart-wrapping-the-system-windows-forms-datavisualization-charting-charting-types.aspx编译FSharpChart库,并出现类似的编译错误
Error 1 The value \'StackedArea100\' was marked inline but its implementation makes use of an internal or private function which is not sufficiently accessible
从
type FSharpChart =
/// Displays multiple seriesÿof data as stacked areas. The cumulative proportion
/// of each stacked element is always 100% of the Y
/// axis.
static member StackedArea100<\'TY when \'TY :> IConvertible>(data: seq<\'TY>) =
GenericChart<_>.Create<StackedArea100Chart>(oneY data)
/// Displays multiple seriesÿof data as stacked areas. The cumulative proportion
/// of each stacked element is always 100% of the Y
/// axis.
static member inline StackedArea100<\'TX, \'TY when \'TX :> IConvertible and \'TY :> IConvertible>(data:seq<\'TX * (\'TY)>) =
GenericChart<_>.Create<StackedArea100Chart>(oneXYSeq data)
/// Displays multiple seriesÿof data as stacked areas. The cumulative proportion
/// of each stacked element is always 100% of the Y
/// axis.
谁能启发我发生了什么事?谢谢。
没有找到相关结果
已邀请:
1 个回复
剑哎
替换为
来解决此问题。如果您可以在F#团队的博客文章中发表评论,那就太好了(这样他们就可以在下一版本中更正此评论)。 要添加更多详细信息: F#编译器不喜欢该代码的原因是,实现中使用的
函数应为
,因此不能内联
(因为它需要访问无法访问的辅助函数)。它在F#Interactive中起作用的原因是将
文件加载到当前程序集中,因此可以看到ѭ7are成员。 安迪(Andy)为什么源代码中没有不必要的“ 3”?这是因为我最初尝试使用帽子类型,例如
编写适用于任何数字类型的通用成员(帽子类型需要require3ѭ)。然后我们决定切换到
,因此不再需要
注释。