Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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.