Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > 78ad68e7dfdebe82ce9af12b4b4b9987 > files > 20

camlmix-1.3.1-2.mga4.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)