Add `map_env` variants for use with functions returning errors
commita125b259c7e0dd5f20620cdcb0d6da7c6ea47166
authorMichael Thomas <mjt@fb.com>
Mon, 28 Feb 2022 16:47:34 +0000 (28 08:47 -0800)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Mon, 28 Feb 2022 16:47:34 +0000 (28 08:47 -0800)
tree6a19bafc70bfbe9892448c23af71d6512ad9f03d
parentc3344a5133279832a04843fbaa98774e732cbf82
Add `map_env` variants for use with functions returning errors

Summary: When moving to pure errors, functions which have error side effects will be refactored from `... -> env * ...` to `... -> (env * Typing_error.t option) * ...`. The `map_env` functions are used extensively in localization to this diff adds variants that can be used with pure errors ahead of that refactor

Reviewed By: vsiles

Differential Revision: D34270859

fbshipit-source-id: d3a74032665696c452a2a98cf917122588e7c53c
hphp/hack/src/common/common.ml
hphp/hack/src/typing/typing_defs.ml
hphp/hack/src/typing/typing_defs.mli
hphp/hack/src/utils/collections/wrappedMap.ml
hphp/hack/src/utils/collections/wrappedMap_sig.ml