来源在哪里:"Function application has higher precedence than infix operators" [Haskell]

Where is the source for: "Function application has higher precedence than infix operators" [Haskell]

我正在学习 Haskell 中的运算符优先级。网络上有几个地方提到函数应用程序比运算符具有 更高 的优先级,但我找不到明确的来源。

这是 A Gentle Introduction To Haskell 提到的一个例子:

Function application has higher precedence than any infix operator

Haskell 98 Report 中有一节提到了它:

normal constructor application has higher precedence than infix constructor application

确定的来源在哪里?我希望它包含在 Haskell 98 报告中,也许我没有正确阅读它。

您可以在 EBNF 中找到它 here

exp^10 -> ...
        | fexp

fexp -> [fexp] aexp

这基本上意味着函数应用程序的优先级为 10,高于允许给运算符的任何优先级。

Haskell 报告 本身就是权威参考,因此您找到的引用就足够了。

您也可以在语法中找到相同的信息。

fexp -> [fexp] aexp
exp_10 -> ... | fexp

您可以看到函数应用程序的优先级为“10”,而所有中缀/前缀运算符的优先级均为 9 或更低。