Commit 3c9f48d4 authored by POTTIER Francois's avatar POTTIER Francois
Browse files

Make [tpair] private and publish [tlocation] instead.

parent dfd5bffc
......@@ -61,11 +61,23 @@ let tstring =
let texn =
TypApp ("exn", [])
(* The type of pairs. *)
let tpair typ1 typ2 =
TypTuple [typ1; typ2]
(* The type of lexer positions. *)
let tposition =
TypApp ("Lexing.position", [])
(* The type of the $loc and $sloc keywords. *)
(* A location is a pair of positions. This might change in the future. *)
let tlocation =
tpair tposition tposition
(* The type of lexer buffers. *)
let tlexbuf =
......@@ -76,11 +88,6 @@ let tlexbuf =
let tobj =
TypApp ("Obj.t", [])
(* The type of pairs. *)
let tpair typ1 typ2 =
TypTuple [typ1; typ2]
(* Building a type variable. *)
let tvar x : typ =
......
......@@ -35,9 +35,9 @@ val tint: typ
val tstring: typ
val texn: typ
val tposition: typ
val tlocation: typ
val tlexbuf: typ
val tobj : typ
val tpair: typ -> typ -> typ
(* Building a type variable. *)
......
......@@ -107,7 +107,7 @@ let actiondef grammar symbol branch =
PAnnot (PVar endp, tposition) ::
PAnnot (PVar starto, tint) ::
PAnnot (PVar endo, tint) ::
PAnnot (PVar loc, tpair tposition tposition) ::
PAnnot (PVar loc, tlocation) ::
formals
) [] branch.producers
in
......@@ -125,8 +125,8 @@ let actiondef grammar symbol branch =
PAnnot (PVar "_endofs", tint) ::
PAnnot (PVar "_endofs__0_", tint) ::
PAnnot (PVar "_symbolstartofs", tint) ::
PAnnot (PVar "_sloc", tpair tposition tposition) ::
PAnnot (PVar "_loc", tpair tposition tposition) ::
PAnnot (PVar "_sloc", tlocation) ::
PAnnot (PVar "_loc", tlocation) ::
formals
in
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment