Improve the specialiser
This MR combines several bits of work:.
- Alexis King's work from !2913 (closed)
- A fix for #17966 (closed), by allowing partial specialisations
- A fix for #17810 (closed) (see the
zapIdDemandInfo
inspecBind
(theNonRec
case).
I got sucked into some refactoring as well. The result is quite satisfying I think.