caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Pierre Weis <Pierre.Weis@inria.fr>
To: skaller@ozemail.com.au (John Max Skaller)
Cc: caml-list@inria.fr
Subject: Re: compilation of lablgl examples.
Date: Thu, 8 Feb 2001 20:15:33 +0100 (MET)	[thread overview]
Message-ID: <200102081915.UAA14918@pauillac.inria.fr> (raw)
In-Reply-To: <3A82CA43.797E84C@ozemail.com.au> from John Max Skaller at "Feb 9, 101 03:33:07 am"

> Pierre Weis wrote:
[...]
> > Sometimes you can use polymorphism to
> > help for instance defining
> > 
> > | Function of 'parameter list * typecode_t * 'b
> > 
> > could be used to modelize both
> > | DCL_function of   parameter_t list * typecode_t * asm_t list
> > | BDCL_function of   bparameter_t list * btypecode_t * int list *
> >  exe_t list * name_map_t
> 
> 	I'm not sure how: these two declarations are for variant 
> components of _distinct_ types.
[...]
> 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

Right. I meant you define only one type

type ('parameter, 'b) ast =
   | Function of 'parameter list * typecode_t * 'b;;

Then you define two abbreviations instances of ast to define the types
to which DCL_function and BDCL_function belong:

type dcl = (parameter_t, asm_t list) ast
and bdcl = (bparameter_t, int list * exe_t list * name_map_t) ast;;

That's only an idea: if types are too diffrent the number of type
parameters rapidly becomes excessive.

Regards,

Pierre Weis

INRIA, Projet Cristal, Pierre.Weis@inria.fr, http://pauillac.inria.fr/~weis/




  reply	other threads:[~2001-02-08 19:15 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-03 22:35 Peter Ronnquist
2001-02-05 17:41 ` John Max Skaller
2001-02-06 15:55   ` Pierre Weis
2001-02-07  1:28     ` John Max Skaller
2001-02-07 22:02       ` Pierre Weis
2001-02-08  5:55         ` Patrick M Doane
2001-02-08 16:33         ` John Max Skaller
2001-02-08 19:15           ` Pierre Weis [this message]
2001-02-08  2:06       ` Jacques Garrigue
2001-02-06  2:34 ` Jacques Garrigue
2001-02-06 18:00   ` Sven LUTHER
2001-02-07 12:09   ` Peter Ronnquist
2001-02-08  7:22     ` Sven

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=200102081915.UAA14918@pauillac.inria.fr \
    --to=pierre.weis@inria.fr \
    --cc=caml-list@inria.fr \
    --cc=skaller@ozemail.com.au \
    /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).