(* kernel version: basic, relative, global *)
(* note : ufficial basic lambda-delta *)
-type uri = Item.uri
-type id = Item.id
-
-type attr = Name of bool * id (* real?, name *)
- | Apix of int (* additional position index *)
-
-type attrs = attr list
+type uri = Entity.uri
+type id = Entity.id
+type attrs = Entity.attrs
type bind = Void of attrs (* attrs *)
| Abst of attrs * term (* attrs, type *)
| Appl of attrs * term * term (* attrs, argument, function *)
| Bind of bind * term (* binder, scope *)
-type obj = bind Item.obj (* age, uri, binder *)
-
-type item = bind Item.item
+type entity = term Entity.entity (* attrs, uri, binder *)
type lenv = Null
(* Cons: tail, relative local environment, binder *)
| Cons of lenv * lenv option * bind
+(* helpers ******************************************************************)
+
+let mk_uri root s =
+ String.concat "/" ["ld:"; "brg"; root; s ^ ".ld"]
+
(* Currified constructors ***************************************************)
let abst a w = Abst (a, w)
| Cons (tl, _, b) ->
let f x = fold_left f map x tl in
map f x b
-
-let rec name err f = function
- | [] -> err ()
- | Name (r, n) :: _ -> f n r
- | _ :: tl -> name err f tl
-
-let rec apix err f = function
- | [] -> err ()
- | Apix i :: _ -> f i
- | _ :: tl -> apix err f tl