What is the fixity of backtick operators?
For instance in this code from Real World Haskell:
ghci> (1+) `fmap` [1,2,3] ++ [4,5,6]
[2,3,4,4,5,6]
It’s evident the backtick operator `fmap` has a higher fixity than ++, but none is given by GHCi.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
§4.4.2 of the Haskell Report states that
“Any operator” includes normal function names in backticks.
Your example shows that
`fmap`does have higher fixity than++, because++acts on the result of thefmap.