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
CHARGUERAUD Arthur
cfml
Commits
bc1ee0f3
Commit
bc1ee0f3
authored
Jan 07, 2016
by
POTTIER Francois
Browse files
Cleanup.
parent
68c05059
Changes
1
Hide whitespace changes
Inline
Side-by-side
generator/print_coq.ml
View file @
bc1ee0f3
open
PPrint
open
Coq
(* Th
is
function could move to [PPrint]. *)
(* Th
ese
function
s
could move to [PPrint]. *)
let
sprintf
format
=
Printf
.
ksprintf
arbitrary_string
format
let
run
(
print
:
Buffer
.
t
->
'
a
->
unit
)
(
x
:
'
a
)
:
string
=
let
b
=
Buffer
.
create
1024
in
print
b
x
;
Buffer
.
contents
b
(* -------------------------------------------------------------------------- *)
(* Global parameters. *)
...
...
@@ -353,8 +358,8 @@ let tops ts =
(* -------------------------------------------------------------------------- *)
(* The main entry point translates a list of toplevel elements to a string. *)
let
tops
ts
:
string
=
let
b
=
Buffer
.
create
1024
in
PPrintEngine
.
ToBuffer
.
pretty
0
.
9
width
b
(
tops
ts
);
Buffer
.
contents
b
run
(
PPrintEngine
.
ToBuffer
.
pretty
0
.
9
width
)
(
tops
ts
)
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