Browse thread
mutually recursive modules
-
Jacques Le Normand
-
Daniel_Bünzli
-
ketti
-
Jacques Le Normand
-
ketti
- rossberg@p...
-
ketti
-
Jacques Le Normand
-
ketti
-
Daniel_Bünzli
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2008-03-24 (09:21) |
From: | rossberg@p... |
Subject: | Re: [Caml-list] mutually recursive modules |
"ketti" <kattlachan@gmail.com> wrote: > > You have to factor out the types of the modules. > Lets say we have modules A and B which are mutually recursive. > A needs to know the signature of B and vise verse. > > So we define the signatures somewhere visible to both A and B: > > module type A_T = sig ... end > module type B_T = sig ... end Note that this only works if the signatures themselves aren't mutually recursive - which often is the case. Unfortunately, there is no solution that works in the general case. - Andreas