aboutsummaryrefslogtreecommitdiff
path: root/lib/syntax/S.ml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/syntax/S.ml')
-rw-r--r--lib/syntax/S.ml11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/syntax/S.ml b/lib/syntax/S.ml
index 918d8e6..a3c74ca 100644
--- a/lib/syntax/S.ml
+++ b/lib/syntax/S.ml
@@ -8,11 +8,20 @@
(** {1 Generic types used in the module} *)
-type pos = Lexing.position * Lexing.position
+type position = Lexing.position = {
+ pos_fname : string;
+ pos_lnum : int;
+ pos_bol : int;
+ pos_cnum : int;
+}
+[@@deriving eq, ord]
+
+type pos = position * position [@@deriving eq, ord]
(** The type pos is used to track the starting and ending position for the given
location. *)
type ('a, 'b) variable = { pos : 'a; name : string; index : 'b option }
+[@@deriving eq, ord]
(** Describe a variable, using the name in capitalized text, and an optionnal
index.