In the REPL can I somehow see with what precence and "fixity" an operator is defined?

Probably state somewhere obvious, but I couldn’t find it: In the PureScript REPL I can use :type to get the type signature of a function or an operator. E.g.:

> :type <$>

Is there a similar REPL command to see precedence (like e.g. 6) and “fixity” (like infix or infixr) of this operator?


No, but you may find this Excel file I created helpful.

Thanks @JordanMartinez. This table is a great resource!

Just curious: How did you compile the table? By hand?

Yeah, it was done by hand. However, now that purescript-language-cst-parser exists, one could extract this information from a package set if they wrote such a program.


It’s a little crude, but in the past I’ve done this to list all of the operators with their fixity/precedence:

egrep -hr ^infix .spago | sort

Crude indeed, but works like a charm!

1 Like