Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cduce
cduce
Commits
38cf7a58
Commit
38cf7a58
authored
Nov 14, 2015
by
Kim Nguyễn
Browse files
Improve the debugging infrastructure (cherry-pick from
parts of
802f291e
).
parent
578f1470
Changes
2
Hide whitespace changes
Inline
Side-by-side
misc/debug.ml
0 → 100644
View file @
38cf7a58
let
margin
=
ref
""
let
increase_margin
()
=
margin
:=
!
margin
^
" "
let
decrease_margin
()
=
margin
:=
String
.
sub
!
margin
0
(
max
(
String
.
length
!
margin
-
2
)
0
)
let
_DEBUG
=
fun
level
?
(
enter
=
false
)
?
(
leave
=
false
)
fmt
->
let
()
=
if
enter
then
begin
Format
.
eprintf
"%s> Entering %s: @
\n
%!"
!
margin
level
;
increase_margin
()
end
else
if
leave
then
begin
decrease_margin
()
;
Format
.
eprintf
"
\n
%s< Leaving %s:@
\n
%!"
!
margin
level
;
end
in
Format
.
eprintf
"%s"
!
margin
;
Format
.
eprintf
fmt
tests/poly/perf-tallying.cd
0 → 100644
View file @
38cf7a58
let x : (('c -> 'c) & ('b -> 'b) & ('a -> 'a)) = fun ('aa -> 'aa; 'bb -> 'bb ; 'cc -> 'cc ) x -> x ;;
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