From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id RAA06069 for caml-redistribution; Fri, 21 Nov 1997 17:30:14 +0100 (MET) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id PAA03718 for ; Fri, 21 Nov 1997 15:45:54 +0100 (MET) Received: from alcaudon.tsc.uc3m.es (alcaudon.tsc.uc3m.es [163.117.139.35]) by nez-perce.inria.fr (8.8.7/8.8.5) with ESMTP id PAA16498 for ; Fri, 21 Nov 1997 15:45:48 +0100 (MET) Received: from tsc.uc3m.es ([163.117.139.166]) by alcaudon.tsc.uc3m.es (Netscape Messaging Server 3.0) with ESMTP id AAA21024; Fri, 21 Nov 1997 15:44:28 +0100 Message-ID: <34759E4C.1AE733A1@tsc.uc3m.es> Date: Fri, 21 Nov 1997 15:44:28 +0100 From: Francisco Valverde Organization: =?iso-8859-1?Q?Teor=EDa?= de la =?iso-8859-1?Q?Se=F1al?= y Comunicaciones X-Mailer: Mozilla 4.03 [en] (X11; I; SunOS 5.5.1 sun4u) MIME-Version: 1.0 To: Caml List Subject: Feature drawn back in new 1.06 version. Salut, Caml listers: (Resum'e en francais: Il n'y a plus de la possibilit'e de faire des types recursifs qui ne includent point d'objects. C'est une restrictions assez forte pour un type special de recherche imbriqu'ee dans deux domaines que je 'etais en train de faire. Des programmes suivent a la fin.) I was using the possibity of defining recursive types for developing a rather convoluted search in two coupled domains, but now I find that I cannot anymore... Has anybody found a(n elegant, concise) way of circumventing it... Please note that the type recursion is ended by inserting appropriate non-recursive variants... Maybe I abused the type system! (Note also that a recursion at the level of structures would be heaven sent!) -------------------------------------------------------------------- module type HALF = sig type score type ('a, 'b) h_label = | Lexicalized of 'a | Built of 'b type ('a, 'b) h_unit = ('a, 'b) h_label option type ('a, 'b, 'c) node = { mutable parent: ('a, 'b, 'c) node option; mutable forest: ('a, 'b, 'c) node list; mutable state: 'b; mutable unit: ('a, 'c) h_unit; mutable depth: int; mutable f: score; mutable g: score } val leq_cost : ('a, 'b, 'c) node -> ('a, 'b, 'c) node -> bool end # module type PRE = sig include HALF type p_state and s_state and p_label and s_label and p = (p_label, p_state, s) node and s = (s_label, s_state, p) node (* abbreviations for the real dual nodes *) val leq_p_cost : p -> p -> bool (* cost functions for exploring paradigmatical nodes *) val leq_s_cost : s -> s -> bool (* cost functions for exploring sintagmatical nodes *) val p_block : p -> unit (* pretty printer for paradigmatical nodes *) val s_block : s -> unit (* pretty printer for sintagmatical nodes *) end;; Characters 115-146: The type abbreviation p is cyclic # -------------------------------------------------------------------- Thanks for any suggestion, -------------------------------------------------------------------- Francisco J. Valverde-Albacete - Ayudante de Universidad e-mail: fva@tsc.uc3m.es |tel: +34-1-6249952 |fax: +34-1-6249430 Dpto. de Tecnolog'ias de las Comunicaciones - Univ Carlos III Madrid c/Butarque, s/n | Leganes 28911 | SPAIN ---------------------------------------------------------------------