Use the request evaluator to get the easier in-module precedence group cycles. Unfortunately, cross-module precedence group cycles are still a possibility, and do not actually cause cyclic request evaluation, so we cannot completely erase the old diagnostics machinery.
Move the machinery itself into the type checker and shift the request into that zone as well to appease the linker.
Restructure the way operators and precedencegroup declarations are validated. First, factor out the common operator validation code into the DeclChecker. Then, redo the lookup and validation code for precedence groups to work with the request model. Finally, delete the validateDecl overloads on the TypeChecker.
Unfortunately, the evaluator is not capable of detecting all the cycles TypeCheckDecl can. In particular, certain cross-file precedence group cycles cannot be diagnosed via request alone. That infrastructure all stays in place.
What I've implemented here deviates from the current proposal text
in the following ways:
- I had to introduce a FunctionArrowPrecedence to capture the parsing
of -> in expression contexts.
- I found it convenient to continue to model the assignment property
explicitly.
- The comparison and casting operators have historically been
non-associative; I have chosen to preserve that, since I don't
think this proposal intended to change it.
- This uses the precedence group names and higherThan/lowerThan
as agreed in discussion.