Don't self-parameterize Tast_visitor classes
commit1a9147e301505bb7ed6c337a1702969c2f2f213c
authorJake Bailey <jakebailey@fb.com>
Mon, 30 Apr 2018 16:35:08 +0000 (30 09:35 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Mon, 30 Apr 2018 17:09:53 +0000 (30 10:09 -0700)
treea6258a4a2c23a9cc8ba6989ac8c4a699b4d32d57
parentd6eb17bb3f595fb4eb5e6c894468c6f21899a981
Don't self-parameterize Tast_visitor classes

Summary:
The visitors ppx_deriving plugin uses self-parameterized classes as a trick to avoid needing to track type parameters and add type annotations. This is convenient for briefly defining the most flexible possible class types, but not necessary for the TAST visitor classes, since they are used in such a way that only one or zero type parameters are needed.

After this change, `Tast_visitor` provides `iter`, `map`, and `endo` classes with no type parameters, and a `reduce` class parameterized only by the result type.

Reviewed By: pittsw

Differential Revision: D7719547

fbshipit-source-id: fc7a22003cd919cca09ea8f1b31246143db726e0
hphp/hack/src/ast/ast_defs.ml
hphp/hack/src/hhbc/semdiff/diff.ml
hphp/hack/src/parser/ast.ml
hphp/hack/src/server/autocompleteService.ml
hphp/hack/src/server/identifySymbolService.ml
hphp/hack/src/server/serverInferType.ml
hphp/hack/src/server/symbolFunCallService.ml
hphp/hack/src/server/symbolTypeService.ml
hphp/hack/src/typing/tast_expand.ml
hphp/hack/src/typing/tast_type_collector.ml
hphp/hack/src/typing/tast_visitor.ml