From: Dmitri Boulytchev <db@tepkom.ru>
To: caml-list@inria.fr
Subject: String representation of the expression: may camlp4 help?
Date: Mon, 15 Aug 2005 17:51:46 +0400 [thread overview]
Message-ID: <43009DF2.8090101@tepkom.ru> (raw)
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
next reply other threads:[~2005-08-15 13:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-15 13:51 Dmitri Boulytchev [this message]
2005-08-15 20:14 ` [Caml-list] " Martin Jambon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43009DF2.8090101@tepkom.ru \
--to=db@tepkom.ru \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).