2 * 2004 Matthew
Fluet (mfluet@acm
.org
)
3 * Ported to MLton threads
.
8 * COPYRIGHT (c
) 1995 AT
&T Bell Laboratories
.
9 * COPYRIGHT (c
) 1989-1991 John H
. Reppy
11 * Debugging support for the CML core
.
14 structure Debug
: DEBUG
=
16 structure C
= Critical
19 fun sayDebug (msgs
: (unit
-> string) list
,
20 msg
: unit
-> string) =
23 val msgs
= List.map (fn f
=> f ()) msgs
24 val msg
= concat
[String.concatWith
" " msgs
, " :: ", msg ()]
27 TextIO.print (concat
[msg
, "\n"]);
31 fun sayDebug
' (msg
: string) = sayDebug ([], fn () => msg
)