Functorize toplevels and give a lexical definition
Functorize toplevels and give a lexical definition

Summary: This diff starts to build the framework for reordering checking of programs. It functorizes the toplevels module and provides an `Ordering` module used to figure out the order of checking statements. Currently, this just uses the regular lexical ordering of the statements in the program, determined using `compare` on their locs.

Reviewed By: panagosg7

Differential Revision: D27722338

fbshipit-source-id: 0d58336de01fc6d3cb8a78e2c371429ed205a7dc

facebook/flow,facebook/flow,mroch/flow,facebook/flow,facebook/flow,facebook/flow,mroch/flow,mroch/flow,mroch/flow,mroch/flow,facebook/flow,mroch/flow,mroch/flow,facebook/flow