* [Caml-list] polymorphism and try
@ 2003-10-14 13:17 Guillaume Châtelet
2003-10-14 15:49 ` Artem Prisyznuk
0 siblings, 1 reply; 2+ messages in thread
From: Guillaume Châtelet @ 2003-10-14 13:17 UTC (permalink / raw)
To: caml-list
I have a problem with polymorphism in a try:
# let my_try f = try f with e -> raise e ;;
val my_try : 'a -> 'a = <fun>
# let my_id = my_try (fun x -> x) ;;
- : '_a -> '_a = <fun>
# let my_array_get = my_try Array.get;;
val my_array_get : '_a array -> int -> '_a = <fun>
etc ....
Why my_id and my_array_get are not polymorphic like i whish to ?
--
Guillaume Châtelet
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-10-14 14:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-14 13:17 [Caml-list] polymorphism and try Guillaume Châtelet
2003-10-14 15:49 ` Artem Prisyznuk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox