Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
* String representation of the expression: may camlp4 help?
@ 2005-08-15 13:51 Dmitri Boulytchev
  2005-08-15 20:14 ` [Caml-list] " Martin Jambon
  0 siblings, 1 reply; 2+ messages in thread
From: Dmitri Boulytchev @ 2005-08-15 13:51 UTC (permalink / raw)
  To: caml-list

    Hello everybody,

    I'm looking for the way to get string representation of the OCaml 
expression
    at compile-time to facilitate test writing. Consider an example:

         let repr, value = WITH_REPR (1+2) in
         Printf.printf "%s=%d" repr value

    Here WITH_REPR is a meta-construction that returns ("1+2", 3) (generally
    speaking WITH_REPR(c) whould return (string * type_of c)).

    Is there some convinient way to do this? May camlp4 help?

    Best regards,
    Dmitri Boulytchev,
    St.Petersburg State University


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-08-15 20:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-15 13:51 String representation of the expression: may camlp4 help? Dmitri Boulytchev
2005-08-15 20:14 ` [Caml-list] " Martin Jambon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox