X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Flambda-delta%2Fbasic_rg%2Fbrg.ml;h=baa83afed3741ca6f94637fec132262d7294a851;hb=f7bb626faf6b9d89c0ee5ac48b1d97c69d189f8a;hp=d0a442807a39015da92630c6f03f1b2aac3f2827;hpb=79684e8bd0f54b5c88fff981366bd8c78dd0fbe9;p=helm.git diff --git a/helm/software/lambda-delta/basic_rg/brg.ml b/helm/software/lambda-delta/basic_rg/brg.ml index d0a442807..baa83afed 100644 --- a/helm/software/lambda-delta/basic_rg/brg.ml +++ b/helm/software/lambda-delta/basic_rg/brg.ml @@ -12,13 +12,9 @@ (* kernel version: basic, relative, global *) (* note : ufficial basic lambda-delta *) -type uri = Unit.uri -type id = Unit.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 *) @@ -31,14 +27,17 @@ and term = Sort of attrs * int (* attrs, hierarchy index *) | Appl of attrs * term * term (* attrs, argument, function *) | Bind of bind * term (* 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 = 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) @@ -85,13 +84,3 @@ let rec fold_left f map x = function | 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