From: Xavier Leroy <Xavier.Leroy@inria.fr>
To: GillesDfnx@mail.dotcom.fr
Cc: caml-list@inria.fr
Subject: Re: 'a -> string ?
Date: Fri, 17 Oct 1997 10:59:46 +0200 (MET DST) [thread overview]
Message-ID: <199710170859.KAA29280@pauillac.inria.fr> (raw)
In-Reply-To: <199710161019.MAA04691@cosmos.imag.fr> from "GillesDfnx@mail.dotcom.fr" at "Oct 16, 97 12:19:19 pm"
> I'm looking for an equivalent of
>
> val output_value : out_channel -> 'a -> unit
>
> that would output the representation of the element of type 'a into a
> 'string' instead of and 'out_channel' (for subsequent inclusion into a
> dbm database). I would like to avoid using a temp file followed by an
> 'input' call.
In the current release (OCaml 1.05), you can do that using
undocumented features, as follows:
let output_value_to_string v = Obj.marshal(Obj.repr v)
The forthcoming release 1.06 will provide a nicer interface for this
feature.
Regards,
- Xavier Leroy
prev parent reply other threads:[~1997-10-17 12:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-10-16 10:19 GillesDfnx
1997-10-16 21:32 ` wakita
1997-10-17 8:59 ` Xavier Leroy [this message]
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=199710170859.KAA29280@pauillac.inria.fr \
--to=xavier.leroy@inria.fr \
--cc=GillesDfnx@mail.dotcom.fr \
--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