-XDerivingVia (and deriving strategies) is under specified in the manual
I had forgotten the syntax for deriving-strategies. Specifically, I wanted to know whether I had to put the strategy before or after the list of classes. So I looked it up.... but the manual doesn't say. The examples suggest that the strategy comes before, but then in the
-XDerivingVia section, the strategy comes after. Are both allowed? Is
via allowed prefix? It is a mystery.
And then I looked through the
-XDerivingVia documentation. That is explained entirely by example, with no standalone specification. Yet the specification really has been worked out -- it's in the paper. This text should be incorporated into the users' guide, along with a link to the paper (which I also did not see). Also needed are a description of how typing works -- or at least scoping. It's very non-trivial.