caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Tom Hirschowitz <hirschow@mouton.inria.fr>
To: caml-list@inria.fr
Subject: Re: circular types?
Date: Tue, 24 Oct 2000 10:48:06 +0200	[thread overview]
Message-ID: <200010240848.e9O8m7v22594@concorde.inria.fr> (raw)

Hendrik Tews writes :
I would like to have recursive types spread over different files
like ....

That should be possible, but again there will be a mixing step, 
creating
a new module, in which the different parts of your recursive types 
block
are linking together.

In your example, you would have :


========== file types.ml

? type formula

type types =
  | Product of types list
  ...
  | Comprehension of formula

===================================

========== file expression.ml

? type formula

type expression =
  | Abstraction of (string * types) list * expression
  ....
  | Formula of formula

===================================

========== file formula.ml

? type expression

type formula = 
  | Forall of (string * types) list * formula
  ...
  | Expression of expression

===================================

========== file next.ml

module MyTypes = Types + Expression + Formula;;

...

===================================

Is it enough?


> It would be great if one could incorporate a class into the
> recursion. But I guess as a first step one has to allow recursion
> between classes and types in one module as in

>     type t = ....

>     and class c = ...

>     and type t' = ...

I'm not here until now, since in the prototype, there are only 
recursive values. But probably O-people at Cristal could answer this 
point.

Bye,

Tom






             reply	other threads:[~2000-10-24 15:51 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-10-24  8:48 Tom Hirschowitz [this message]
2000-10-26  8:39 ` Hendrik Tews
2000-10-26  9:11   ` Tom Hirschowitz
  -- strict thread matches above, loose matches on Subject: below --
2000-10-23  7:43 Tom Hirschowitz
2000-10-23 15:35 ` Brian Rogoff
2000-10-25 14:03   ` John Max Skaller
2000-10-25 19:47     ` Brian Rogoff
2000-10-26  9:12     ` Hendrik Tews
2000-10-26 16:37       ` John Max Skaller
2000-10-24  8:37 ` Hendrik Tews
2000-10-25 14:31   ` John Max Skaller
2000-10-26  8:51     ` Hendrik Tews
2000-10-20  2:35 Chris Hecker
2000-10-20 12:24 ` Pierre Weis
2000-10-20 21:34   ` Chris Hecker
2000-10-21  8:02     ` Pierre Weis
2000-10-21 18:37       ` Chris Hecker
2000-10-21 12:22     ` Vitaly Lugovsky
2000-10-21 18:29       ` Chris Hecker
2000-10-21 22:36     ` Brian Rogoff
2000-10-23 18:43     ` Anton Moscal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200010240848.e9O8m7v22594@concorde.inria.fr \
    --to=hirschow@mouton.inria.fr \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).