caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Peng Zang <peng.zang@gmail.com>
To: Edgar Friendly <thelema314@gmail.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] specifying the type of an argument with more than one #classpath
Date: Wed, 5 Mar 2008 21:04:48 -0500	[thread overview]
Message-ID: <200803052104.52266.peng.zang@gmail.com> (raw)
In-Reply-To: <47CF4F57.3060309@gmail.com>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

This works if #foo just implies one method "foo".

But suppose it were more general, like:

  #drawable which implies methods draw2,drawfast,drawbuffered,etc..

and

  #foldable which implies methods iter,sample,map,to_list,etc...

We would like to avoid calling every implied method.


Thanks,

Peng


On Wednesday 05 March 2008 08:56:39 pm Edgar Friendly wrote:
> Peng Zang wrote:
> > Is there some simple trick people have found for specifying various type
> > constraints on arguments?
>
> How about something like:
> let takesomefooable_and_barable x =
> 	ignore(lazy(x#foo));
> 	ignore(lazy(x#bar));
> 	x
>
> E


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)

iD8DBQFHz1FEfIRcEFL/JewRAnlgAJ9kD4/itxfOvyl+IPIIaYojssHG+wCcDXIg
1CkxusK3dP96MHBS1PBe67k=
=2X1k
-----END PGP SIGNATURE-----


  reply	other threads:[~2008-03-06  2:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-06  1:52 Peng Zang
2008-03-06  1:56 ` [Caml-list] " Edgar Friendly
2008-03-06  2:04   ` Peng Zang [this message]
2008-03-06  2:16 ` Eric Cooper
2008-03-06 12:02   ` Peng Zang

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=200803052104.52266.peng.zang@gmail.com \
    --to=peng.zang@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=thelema314@gmail.com \
    /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).