-
Notifications
You must be signed in to change notification settings - Fork 85
Description
This issue describes the next step regarding the operator chains overhaul, it is based on the work in #830.
We need to introduce the ability to overwrite fixity info of specific operators selectively. The override should be added to the Config type and can have exactly the same type as normal fixity map. There should be also a mechanism to read .ormolu (suggested name for configuration files) automatically if it exists, otherwise do nothing leaving the overriding fixity map empty.
I propose we use the same familiar syntax in .ormolu for fixity information, e.g.:
infixl 9 !!
infix 4 `elem`, `notElem`This has the advantage that it is immediately editable by Haskellers without a need to study a new syntax.
Further, the new override mechanism should be used in the test suite instead of our current practice of choosing a few packages that have the right operators in order to get the "right" results in the tests. This should make the test suite a little bit more robust.