Skip to content
Discussions/App Development/Documentation of operator fixityForum ↗

Documentation of operator fixity

App Development4 posts422 views7 likesLast activity May 2021
AL
Alexander_BernauerOP
May 2021

Hi

DAML FP intro is mentioning the concept of fixity and is referring to the Haskell report for more details. That’s all good.

However, the DAML documentation does not mention the fixity of operators. In contrast, the Haskell documentation does, which I think it should, because the fixity of an operator affects is semantics, I would argue.

Is this something that can be added? Until then the workaround is to use the Haskell documentation under the assumption that the DAML implementation has chosen the same fixity for common operators.

Regards,
Alex

GA
Gary_Verhaegen
May 2021
Alexander_Bernauer:

Is this something that can be added? Until then the workaround is to use the Haskell documentation under the assumption that the DAML implementation has chosen the same fixity for common operators.

Alternatively, use parentheses. That way, you don’t need to look up any fixity, and readers of your code don’t either.

AL
Alexander_Bernauer
May 2021

Hi @Gary_Verhaegen

thanks for your response. The purpose of fixity is to avoid cluttering the code with too many parenthesis. I am thinking about operators like $, <$>, >>=, ., etc. I don’t think it’s practical to make their fixity explicit through parenthesis.

Kind regards,
Alex

CO
cocreature
May 2021

Definitely a reasonable feature request but I expect it will take a while until we get around to it. I created Document fixity in daml-docs · Issue #9745 · digital-asset/daml · GitHub to track this.

← Back to Discussions