If back-tick changes a prefix function to infix, and parenthesis changes a infix function to prefix, then:
Syntactically, why would (`subtract`) 1 2
fail?
Although "backticks turn prefix to infix and parentheses turn infix to prefix" is a convenient mental shortcut, it is not a precise description of the Haskell syntax. For that, you should turn to the Report, which makes it clear that the class of things that can go inside backticks (or parentheses) is quite restricted. The only thing allowed in backticks is simple identifiers, and likewise for the kind of parentheses that make infix things prefix.
Backticks are "just syntax". Which is a kind way of saying that they're a hack. Instead of trying to build them an everywhere consistent mechanism the designers of Haskell opted to just give one simple trick as syntax sugar.
Sadly there's not really a much more interesting answer to be had.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With