Sophie

Sophie

distrib > Mageia > cauldron > x86_64 > by-pkgid > 7760a9428e68cff97f52b2b4e39a41f1 > files > 23

camlmix-1.3.1-8.mga7.x86_64.rpm

##
(* Load this file and line directives will be printed.
   Very useful if you use camlmix for preprocessing OCaml programs.

   Example: camlmix xpp.mlx foo.mlx -o foo.ml -clean *)

let line_directive () =
  Printf.sprintf "\n# %i %S;;\n%s" 
    !Camlmix.line
    !Camlmix.source 
    (String.make (!Camlmix.char - 1) ' ')

let current_printer = !Camlmix.printer
let _ = Camlmix.printer := (fun s -> 
			      print (line_directive ()); 
			      current_printer s)