Commit af7816f8 authored by POTTIER Francois's avatar POTTIER Francois
Browse files

test/static/src/test.ml: make dune.auto more readable.

parent 686f4383
This diff is collapsed.
...@@ -92,16 +92,21 @@ type inputs = input list ...@@ -92,16 +92,21 @@ type inputs = input list
type sexp = type sexp =
| A of string | A of string
| L of sexp list | L of sexp list
| Lnewline of sexp list
let rec print_sexp ppf = function let rec print_sexp ppf = function
| A s -> | A s ->
Format.pp_print_string ppf s Format.pp_print_string ppf s
| L l -> | L l ->
Format.fprintf ppf "@[<1>(%a)@]" Format.fprintf ppf "@[<2>(%a)@]"
(Format.pp_print_list ~pp_sep:Format.pp_print_space print_sexp) l
| Lnewline l ->
Format.fprintf ppf "@[<v 2>(%a)@]"
(Format.pp_print_list ~pp_sep:Format.pp_print_space print_sexp) l (Format.pp_print_list ~pp_sep:Format.pp_print_space print_sexp) l
let print_sexp sexp = let print_sexp sexp =
Format.printf "@[<v>%a@,@]" print_sexp sexp Format.printf "@[<v>%a@,@]" print_sexp sexp;
Format.print_newline()
(* -------------------------------------------------------------------------- *) (* -------------------------------------------------------------------------- *)
...@@ -247,7 +252,7 @@ let run (inputs : inputs) = ...@@ -247,7 +252,7 @@ let run (inputs : inputs) =
print_sexp print_sexp
(L[A"alias"; (L[A"alias";
L[A"name"; A"test"]; L[A"name"; A"test"];
L(A"deps" :: List.map (fun id -> L[A"alias"; A id]) ids)]) Lnewline(A"deps" :: List.map (fun id -> L[A"alias"; A id]) ids)])
(* -------------------------------------------------------------------------- *) (* -------------------------------------------------------------------------- *)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment