Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
POTTIER Francois
menhir
Commits
af7816f8
Commit
af7816f8
authored
Jan 24, 2020
by
POTTIER Francois
Browse files
test/static/src/test.ml: make dune.auto more readable.
parent
686f4383
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
test/static/src/dune.auto
View file @
af7816f8
This diff is collapsed.
Click to expand it.
test/static/src/test.ml
View file @
af7816f8
...
@@ -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
)])
L
newline
(
A
"deps"
::
List
.
map
(
fun
id
->
L
[
A
"alias"
;
A
id
])
ids
)])
(* -------------------------------------------------------------------------- *)
(* -------------------------------------------------------------------------- *)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment