From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id BAA02790; Thu, 22 Mar 2001 01:23:00 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id BAA02618 for ; Thu, 22 Mar 2001 01:22:59 +0100 (MET) Received: from shell5.ba.best.com (shell5.ba.best.com [206.184.139.136]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f2M0Mvj23533 for ; Thu, 22 Mar 2001 01:22:58 +0100 (MET) Received: from localhost (bpr@localhost) by shell5.ba.best.com (8.9.3/8.9.2/best.sh) with ESMTP id QAA26094; Wed, 21 Mar 2001 16:22:52 -0800 (PST) Date: Wed, 21 Mar 2001 16:22:52 -0800 (PST) From: Brian Rogoff To: Patrick M Doane cc: John Max Skaller , caml-list@inria.fr Subject: Re: [Caml-list] recursive modules redux, & interface files In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Wed, 21 Mar 2001, Patrick M Doane wrote: > I don't see that it makes much of a difference. Besides, the reason it > hasn't worked well for me is that inevitably I want to add some > functions to the module that has the variant type. For example, pretty > printers. The next compromise is to continue the path without a .mli file > until I don't want some of these utilities to be exported. In the end, > I'm back to the source of the problem, having to duplicate a large variant > type. What's the problem with the hack I suggested earlier: put the huge variant (and other duplicated types) in a "pure" .mli file (I hate using .ml for that) and "open"ing it where you need it, once in the .mli file and once in the .ml file? This way you reduce the duplication to two lines. I know some people are open-phobes, but I find this use of open to be acceptable. -- Brian > > On Thu, 22 Mar 2001, John Max Skaller wrote: > > > Patrick M Doane wrote: > > > > > For projects that I've worked on that have huge variant types, I have > > > typically placed the variants in a module by themselves with no .mli file. > > > This technique hasn't worked too well for me in practice and is still > > > annoying for the smaller variants. > > > > Try placing them in a .mli file instead (no 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 > ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr