Dawid Toton wrote: > let f3 : forall 'a . unit -> 'a list ref = > fun (type 'aa) -> > let r = ref ([] : 'aa list) in > fun () -> > r > > (* f3: Fine, but it would require some work at compile time or smart > transformations to keep types erased at run-time. Also, keeping the > first actual argument (staying for 'aa) implicit would need extra rules > to resolve ambiguities (decide when this argument is applied). *)
No, this would be unsound, because "fun (type t) -> ..." does not the suspend computation -- there'd be only one ref. It's not System F. /Andreas -- Caml-list mailing list. Subscription management and archives: https://sympa-roc.inria.fr/wws/info/caml-list Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs
