caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] le neophyte et les modules, types parametres
@ 2001-04-25 15:49 Francois Thomasset
  2001-04-25 16:16 ` Brian Rogoff
  2001-04-25 16:20 ` Alain Frisch
  0 siblings, 2 replies; 3+ messages in thread
From: Francois Thomasset @ 2001-04-25 15:49 UTC (permalink / raw)
  To: caml-list

Désolé de poser des qustions simplistes mais je suis perdu dans les modules.
Dans l'idée de construire une table de symboles je définis ceci :
# type symbol = string * int ;;
# type comparison = Equiv | Smaller | Greater;;
# module type ORDERED =
    sig
      type 'a t
      val order : 'a t -> 'a t -> comparison
    end;;
module type ORDERED =
  sig type 'a t val order : 'a t -> 'a t -> comparison end
# module type AVL_FUNCTOR = functor ( Key : ORDERED ) ->
  sig
    type 'a key = 'a Key.t
    type avl_btree = ('a key * int) btree
    ...
  end;;
The type constructor Key.t expects 1 argument(s),
but is here applied to 0 argument(s)

D'accord je suppose que c'est le type 'a qui manque (un jour ce sera les 
morceaux d'environnement attachés aux symboles, donc je n'ai pas envie de 
préciser tout de suite) ; mais je ne comprends pas comment le dire autrement 
que ci-dessus ; quelque chose a du m'échapper...

Question: how to use a parameter type in a module, cf example above

					François Thomasset.
					INRIA (A3)

Tel: +33 (1) 39-63-54-75
Fax: +33 (1) 39-63-53-30 ou +33 (1) 39-63-59-95
Email: Francois.Thomasset@inria.fr
Smail: INRIA, Rocquencourt, BP 105, 78153 Le Chesnay Cedex, France


-------------------
To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-04-25 16:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-25 15:49 [Caml-list] le neophyte et les modules, types parametres Francois Thomasset
2001-04-25 16:16 ` Brian Rogoff
2001-04-25 16:20 ` Alain Frisch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).