1. camlspotter
  2. meta_conv

Commits

camlspotter  committed d34506b

added (--)

  • Participants
  • Parent commits 68fbf83
  • Branches default

Comments (0)

Files changed (3)

File json/tests/OMakefile

View file
  • Ignore whitespace
     $(OCAMLC) $(CAMLFLAGS) -g -I .. -I ../../lib ../../lib/meta_conv.cmo ../json_conv.cma test.out.ml -o $@
 
 %.out.auto.mli: %.out.ml ../json_conv.cmi
-    $(OCAMLC) $(CAMLFLAGS) -c -i -I .. -I ../../lib  test.out.ml > $@
+    $(OCAMLC) $(CAMLFLAGS) -c -i -I .. -I ../../lib  %.out.ml > $@
 
 .DEFAULT: test.out.ml test.out test.out.auto.mli
 

File pa/tctools.ml

View file
  • Ignore whitespace
   in 
   loop f
 
+let (--) = from_to
+
 (** { 6 Idents and Paths } *)
 
 (** [mk_idents name n] creates idents from name1 to namen *) 
 let mk_idents : string -> int -> ident list = fun pref n ->
-  List.map (fun i -> IdLid (_loc, pref ^ string_of_int i)) (from_to 1 n)
+  List.map (fun i -> IdLid (_loc, pref ^ string_of_int i)) (1 -- n)
 
 (** A.x => A.y where y = f x *)
 let rec change_id f = function

File pa/tctools.mli

View file
  • Ignore whitespace
 val from_to : int -> int -> int list
 (** [ from_to f t = [f; f+1; ..; t] ] *)
 
+val (--) : int -> int -> int list
+(** Same as [from_to] *)
+
 
 
 (** { 6 Idents and Paths } *)