GHC警告我没有顶层的功能签名。我不明白为什么我需要他们。与提供它们的问题是,他们是相当复杂的,像这样的(自动生成):为什么我的顶级函数需要在Haskell中签名?
applyValue :: forall t t1 t2 t3 t4.
(t2 -> t)
-> (t2 -> t3 -> t4 -> t1) -> t2 -> t3 -> t4 -> (t -> Bool) -> [t1]
那么,为什么我懒得将它们添加?
函数本身:
applyValue getValueAt stitchAndMove at fabric mark matchAt =
if matchAt (getValueAt at)
then [stitchAndMove at fabric mark]
else []
您是否启用了任何扩展功能? –
我们可以看到一些代码吗? – jozefg
如果发生这种情况是因为您使用'-Wall'编译,则可以使用'-fno-warn-missing-signature'。不排除他们是好的做法 - 请参阅Daniel Wagner的回答,原因是为什么。 –