English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
modules and recursive types
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2000-11-06 (20:10)
From: Julian Assange <proff@i...>
Subject: modules and recursive types

I'd like to do something like the following:

type snode = Empty | Snode of CharSet.t
and
module CharSet = Set.Make(struct type t = char * snode
		            let compare (x,_) (y,_) = Pervasives.compare x y
			  end)

That is define an inter-dependent typing relationship between two
modules (although there is only one module here, the other can be
viewed as the `null' module). Is this possible?  If not is there
another way to achieve the effect?

Cheers,
Julian.