English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] Odd Type Checking Problem
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-02-06 (21:19)
From: Remi VANICAT <vanicat@l...>
Subject: Re: [Caml-list] Odd Type Checking Problem
stalkern2 <stalkern2@tin.it> writes:

> Beginner's opinion:
> I think that the compiler/interpreter is clear: 
> 	'a->'b->'a 
> 	is not 
> 	'a->'a->'b->'a
> and that you just let the function starve before giving it the last
> meatball. 

It's not the reason : in ocaml, you can do partial application (giving
not all argument to a function). 

it steel strange because 

let mAny: 'a -> int -> 'a = fun succ0 input -> succ0;;
let ans0 = true;;
let x = mAny (mAny ans0);;
x 1 2;;

type checks...

Rémi Vanicat
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr