Use deriving Functor in the codebase
In many places in compiler/ we manually define a Functor instance (`git grep "instance Functor"` shows 60). I think we could switch to `deriving` in most (or all?) cases.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.4.3 |
| Type | Task |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Use deriving Functor in the codebase","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"8.8.1","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.4.3","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Task","description":"In many places in compiler/ we manually define a Functor instance (`git grep \"instance Functor\"` shows 60). I think we could switch to `deriving` in most (or all?) cases.","type_of_failure":"OtherFailure","blocking":[]} -->
issue