From: Francisco Valverde <fva@tsc.uc3m.es>
To: Caml List <caml-list@inria.fr>
Subject: Feature drawn back in new 1.06 version.
Date: Fri, 21 Nov 1997 15:44:28 +0100 [thread overview]
Message-ID: <34759E4C.1AE733A1@tsc.uc3m.es> (raw)
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
---------------------------------------------------------------------
next reply other threads:[~1997-11-21 16:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-11-21 14:44 Francisco Valverde [this message]
1997-11-24 16:27 ` Jerome Vouillon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=34759E4C.1AE733A1@tsc.uc3m.es \
--to=fva@tsc.uc3m.es \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox