mirror of
https://github.com/CatalaLang/catala.git
synced 2024-09-19 16:28:12 +03:00
More comments for I/O
This commit is contained in:
parent
a56d9f674a
commit
a9f5495cf1
@ -84,15 +84,22 @@ type expr =
|
||||
|
||||
val locations_used : expr Pos.marked -> LocationSet.t
|
||||
|
||||
(** This type characterizes the three levels of visibility for a given scope variable with regards
|
||||
to the scope's input and possible redefinitions inside the scope.. *)
|
||||
type io_input =
|
||||
| NoInput (** For an internal variable defined only in the scope *)
|
||||
| OnlyInput (** For variables that should not be redefined in the scope *)
|
||||
| Reentrant (** For variables defined in the scope that can also be redefined by the caller *)
|
||||
| NoInput
|
||||
(** For an internal variable defined only in the scope, and does not appear in the input. *)
|
||||
| OnlyInput
|
||||
(** For variables that should not be redefined in the scope, because they appear in the input. *)
|
||||
| Reentrant
|
||||
(** For variables defined in the scope that can also be redefined by the caller as they appear
|
||||
in the input. *)
|
||||
|
||||
type io = {
|
||||
io_output : bool Pos.marked;
|
||||
io_input : io_input Pos.marked; (** True if present in the scope's input (reentrant) *)
|
||||
io_output : bool Pos.marked; (** [true] is present in the output of the scope. *)
|
||||
io_input : io_input Pos.marked;
|
||||
}
|
||||
(** Characterization of the input/output status of a scope variable. *)
|
||||
|
||||
type rule =
|
||||
| Definition of location Pos.marked * typ Pos.marked * io * expr Pos.marked
|
||||
|
Loading…
Reference in New Issue
Block a user