Browse thread
polymorphic method.
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Guillaume Yziquel <guillaume.yziquel@c...> |
| Subject: | Re: [Caml-list] polymorphic method. |
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/