caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Guillaume Yziquel <guillaume.yziquel@citycable.ch>
To: blue storm <bluestorm.dylc@gmail.com>
Cc: Jacques Garrigue <garrigue@math.nagoya-u.ac.jp>, caml-list@inria.fr
Subject: Re: [Caml-list] polymorphic method.
Date: Fri, 11 Sep 2009 10:20:14 +0200	[thread overview]
Message-ID: <4AAA083E.7070902@citycable.ch> (raw)
In-Reply-To: <527cf6bc0909110014s7da89384hdd86fb87f0e1969d@mail.gmail.com>

blue storm a écrit :
>
> With a camlp4 extension, you could inspect the (syntaxically explicit)
> parameters of you method, and (syntaxically) generate a polymorphic
> type for each one : "polymorphic method foo bar baz = ..." would be
> translated into "method foo : 'a 'b . 'a -> 'b -> 'c = fun (bar : 'a)
> (baz : 'b) -> ...".
> This is probably not what you want.

Indeed, it's not what I want.

> but my general advice is not to try to much to do
> type-level transformation by syntaxic transformations : they tend to
> get flawed in ways you don't expect, and this is just not the right
> tool for the job.

Too bad there's no "type checking extension" in Objective Caml. That 
would be huge fun.

Thanks.

-- 
      Guillaume Yziquel
http://yziquel.homelinux.org/


  reply	other threads:[~2009-09-11  8:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4AA191F3.5000004@yziquel.homelinux.org>
2009-09-10 12:30 ` Guillaume Yziquel
2009-09-10 12:30 ` Guillaume Yziquel
2009-09-10 12:48   ` [Caml-list] " Jacques Garrigue
2009-09-10 13:05     ` Guillaume Yziquel
2009-09-10 14:21       ` Jacques Garrigue
2009-09-10 19:14         ` Guillaume Yziquel
2009-09-11  7:14           ` blue storm
2009-09-11  8:20             ` Guillaume Yziquel [this message]
2009-09-11  8:18           ` Jacques Garrigue
2009-09-11  9:40             ` Guillaume Yziquel

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=4AAA083E.7070902@citycable.ch \
    --to=guillaume.yziquel@citycable.ch \
    --cc=bluestorm.dylc@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=garrigue@math.nagoya-u.ac.jp \
    /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).