Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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
vanicat@labri.u-bordeaux.fr
http://dept-info.labri.u-bordeaux.fr/~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