caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Odd Type Checking Problem
@ 2002-02-06 19:37 Jonathan D Eddy
  2002-02-06 22:59 ` Alain Frisch
  2002-02-07  3:15 ` [Caml-list] Odd Type Checking Problem stalkern2
  0 siblings, 2 replies; 10+ messages in thread
From: Jonathan D Eddy @ 2002-02-06 19:37 UTC (permalink / raw)
  To: caml-list

Does anyone see why the first chunk should type check while the second
should not? The only difference is the explicit type annotation on mAny,
which seems to be clearly correct.

Thanks, Jon


(* type checks *)
let mAny = fun succ0 input -> succ0 in
    let ans0 = true in
    let x = mAny (mAny ans0) in
        x 1 2

(* does not type check *)
let mAny: 'a -> int -> 'a = fun succ0 input -> succ0 in
    let ans0 = true in
    let x = mAny (mAny ans0) in
        x 1 2
-------------------
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


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2002-02-08  9:24 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-06 19:37 [Caml-list] Odd Type Checking Problem Jonathan D Eddy
2002-02-06 22:59 ` Alain Frisch
2002-02-07  9:45   ` Tom Hirschowitz
2002-02-07 10:04     ` Tom Hirschowitz
2002-02-07 11:21   ` [Caml-list] Type variables (was: Odd Type Checking Problem) Alain Frisch
2002-02-07 12:25     ` Markus Mottl
2002-02-08  1:33       ` Jacques Garrigue
2002-02-08  9:24         ` Markus Mottl
2002-02-07  3:15 ` [Caml-list] Odd Type Checking Problem stalkern2
2002-02-06 21:19   ` Remi VANICAT

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).