Add interface for Ligo_prim/Binder.ml
type:internal
And an interface to the type Binder.ml which make type t
abstract.
This has the advantage on forcing the programmer to manipulate Binder.t indirectly from the interface and not from its structure.
This present the following advantages :
- Improve maintenance. The internal representation of t can change, as long as the interface doesn't change, the rest of the project should stay unchanged.
- Improve code factorization. As manipulation of t can only be done inside Binder.ml, you won't have similar process in different files, instead they will call the interface to run the process, which will be all in the same file (making it easier to spot code duplication).
- Improve readability. In place of doing structural manipulation, the code is calling an interface function, whose name should be descriptive and explain the process.