From: Oliver Bandel <oliver@first.in-berlin.de>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Lambda-Term (f x) (x f) translated to Ocaml?
Date: Tue, 28 Mar 2006 03:11:59 +0200 [thread overview]
Message-ID: <20060328011159.GA841@first.in-berlin.de> (raw)
In-Reply-To: <24000351.1143506695382.JavaMail.www@wwinf1608>
On Tue, Mar 28, 2006 at 02:44:55AM +0200, yoann padioleau wrote:
>
> > Hello,
> >
> > I'm not firm in lambda calculus, what is the lambda-term
> > in the subject translated to OCaml?
> >
> > Is this possible?
>
> the ocaml interpreter dont want this definition
>
> let g f x = (f x) (x f)
Oh, looks easy.... ( at least the definition on the left side ;-) )
>
> and shout:
> this expression has type ('a -> 'b) -> 'c -> 'd but is here used with type 'a
OK,
I tried this:
=====================================================================
first:~/Desktop oliver$ ocaml
Objective Caml version 3.09.0
# let g f x = (f x) (x f) ;;
This expression has type ('a -> 'b) -> 'c -> 'd but is here used with type 'a
# ^D
first:~/Desktop oliver$ ocaml -rectypes
Objective Caml version 3.09.0
# let g f x = (f x) (x f) ;;
val g : (('a -> 'c as 'b) -> 'c -> 'd as 'a) -> 'b -> 'd = <fun>
#
=====================================================================
Well, looks complicated to me.
Any hints to this?
Ciao,
Oliver
next prev parent reply other threads:[~2006-03-28 1:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-28 0:44 yoann padioleau
2006-03-28 0:55 ` Marius Nita
2006-03-28 1:11 ` Oliver Bandel [this message]
2006-03-31 21:01 ` Thomas Fischbacher
2006-03-31 23:53 ` yoann padioleau
-- strict thread matches above, loose matches on Subject: below --
2006-03-28 0:07 Oliver Bandel
2006-03-31 20:58 ` [Caml-list] " Thomas Fischbacher
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=20060328011159.GA841@first.in-berlin.de \
--to=oliver@first.in-berlin.de \
--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