Haskell的函数应用运算符($)用法

Haskell's function application operator ($) usage

我正在阅读 Bartosz Milewski 的一篇文章,其中他定义了以下函数:

instance Applicative Chan where
  pure x = Chan (repeat x)
  (Chan fs) <*> (Chan xs) = Chan (zipWith ($) fs xs)

为什么括号里是函数应用运算符?我知道这通常是为了以前缀符号形式使用中缀函数,但我不明白为什么在这种情况下,函数不能简单地表示为 Chan (zipWith $ fs xs),并且想知道两者有什么区别

(如果还需要context,参考article

在这种情况下,$ 传递给 zipWith。和写

一样
zipWith (\ f x ->  f x) fs xs

没有括号,它相当于

zipWith (fs xs)

这不会进行类型检查。

括号中的运算符与普通标识符完全一样。定义如下:

apply = ($)

代码可能看起来像

zipWith apply fs xs