From: Thierry Martinez <thierry.martinez@inria.fr>
To: rixed@happyleptic.org
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Bless me Father, for I have used Obj.magic
Date: Fri, 23 Dec 2011 00:29:32 +0100 [thread overview]
Message-ID: <874nws89sz.fsf@inria.fr> (raw)
In-Reply-To: <20111222212429.GA8156@yeeloong.happyleptic.org> (rixed@happyleptic.org's message of "Thu, 22 Dec 2011 22:24:30 +0100")
rixed@happyleptic.org :
> let make ... =
> let some_operation t_priv t1 =
> ... use t_priv to return a t2 ... in
> let rec t_priv = { t ;
> some_other_fields = some_values }
> and t = { operation = some_operation t_priv ;
> some_fields = some_values }
> in t
>
> This does not compile because of the way t_priv is used within t
> construction. The policed way to get around this seams to be:
This will compile if you η-expand the partial application of
some_operation into “(fun t1 -> some_operation t_priv t1)”.
But perhaps your example is over simplified and hide the real
difficulty.
--
Thierry.
next prev parent reply other threads:[~2011-12-22 23:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-22 21:24 rixed
2011-12-22 22:07 ` Fabrice Le Fessant
2011-12-22 22:19 ` rixed
2011-12-22 23:29 ` Thierry Martinez [this message]
2011-12-23 12:04 ` rixed
2011-12-23 12:26 ` Fabrice Le Fessant
2011-12-30 11:41 ` Damien Doligez
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=874nws89sz.fsf@inria.fr \
--to=thierry.martinez@inria.fr \
--cc=caml-list@inria.fr \
--cc=rixed@happyleptic.org \
/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