Browse thread
[Caml-list] recursive modules redux, & interface files
-
Chris Hecker
- Brian Rogoff
- Xavier Leroy
- John Max Skaller
[
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: | -- (:) |
| From: | John Max Skaller <skaller@o...> |
| Subject: | Re: [Caml-list] recursive modules redux, & interface files |
Chris Hecker wrote: > > Two questions/problems: > > 1. So, I understand that doing recursive types across modules is hard (but I'd say very important for decoupling large software), but is it true that I can't even call across modules recursively? Yes. More precisely, you cannot forward reference any symbol, however you _can_ call forward by passing a function backward as an argument. [This sucks though] > 2. Also, on a related note, why do the interface file and the implementation file (or equivalently, I believe, the signature and structure) both have to have all the concrete types duplicated? Because types in a given implementation may or may not be present in the interface. IF you have a file containing ONLY types, then there is no need to have an .ml file for it. If you have even one val (function, class), you need the .ml file. -- John (Max) Skaller, mailto:skaller@maxtal.com.au 10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850 checkout Vyper http://Vyper.sourceforge.net download Interscript http://Interscript.sourceforge.net ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr