]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/acic_procedural/proceduralHelpers.ml
Acic2Procedural:
[helm.git] / helm / software / components / acic_procedural / proceduralHelpers.ml
index 91f7016cd83de6f5baaa916d72efb3fc7769fb94..7d95d86775de199f8e83ee7a1798bf6556b9ef4e 100644 (file)
@@ -50,10 +50,10 @@ let abst s w = Some (s, C.Decl w)
 let abbr s v w = Some (s, C.Def (v, w))
 
 let pp_sort out = function
-   | C.Type _  -> out "\Type"
-   | C.Prop    -> out "\Prop"
-   | C.CProp _ -> out "\CProp"
-   | C.Set     -> out "\Set"
+   | C.Type _  -> out "*Type"
+   | C.Prop    -> out "*Prop"
+   | C.CProp _ -> out "*CProp"
+   | C.Set     -> out "*Set"
 
 let pp_name out = function
    | C.Name s    -> out s
@@ -163,6 +163,19 @@ let mk_fresh_name context = function
 
 (* helper functions *********************************************************)
 
+let rec list_fold_right_cps g map l a = 
+   match l with
+      | []       -> g a
+      | hd :: tl ->
+         let h a = map g hd a in
+         list_fold_right_cps h map tl a
+
+let rec list_fold_left_cps g map a = function
+   | []       -> g a
+   | hd :: tl ->
+      let h a = list_fold_left_cps g map a tl in
+      map h a hd
+
 let rec list_map_cps g map = function
    | []       -> g []
    | hd :: tl ->