[email protected] : > let make ... = > let some_operation t_priv t1 = > ... use t_priv to return a t2 ... in > let rec t_priv = { t ; > some_other_fields = some_values } > and t = { operation = some_operation t_priv ; > some_fields = some_values } > in t > > This does not compile because of the way t_priv is used within t > construction. The policed way to get around this seams to be:
This will compile if you η-expand the partial application of some_operation into “(fun t1 -> some_operation t_priv t1)”. But perhaps your example is over simplified and hide the real difficulty. -- Thierry. -- 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
