(* kernel version: basic, absolute, global *)
(* note : experimental *)
-type uri = Unit.uri
-type id = Unit.id
+type uri = Entity.uri
+type id = Entity.id
type bind = Void (* exclusion *)
| Abst of term (* abstraction *)
and term = Sort of int (* hierarchy index *)
| LRef of int (* location *)
| GRef of uri (* reference *)
- | Cast of term * term (* type, term *)
+ | Cast of term * term (* domain, element *)
| Appl of term * term (* argument, function *)
| Bind of int * id * bind * term (* location, name, binder, scope *)
-type entry = bind Unit.entry (* age, uri, binder *)
-
-type unit = bind Unit.unit
+type entity = term Entity.entity (* attrs, uri, binder *)
type lenv = (int * id * bind) list (* location, name, binder *)
type message = (lenv, term) Log.item list
+(* helpers ******************************************************************)
+
+let mk_uri si root s =
+ let kernel = if si then "bag-si" else "bag" in
+ String.concat "/" ["ld:"; kernel; root; s ^ ".ld"]
+
(* Currified constructors ***************************************************)
let abst w = Abst w