Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Christophe Raffalli <Christophe.Raffalli@univ-savoie.fr>
Cc: caml-list@inria.fr
Subject: Re: convenient features
Date: Fri, 30 Jun 2000 11:22:50 +0200	[thread overview]
Message-ID: <395C66EA.645DA1F8@univ-savoie.fr> (raw)
In-Reply-To: <200006291657.SAA11050@pauillac.inria.fr>


I have a problem to define a type ! 
Whe I want is the following (which is incorrect !)


(* index in a sequence *)
type index = { 
  index_key : int; 
  mutable index_val : index_val
} 
and index_val =
    Noval of index list 
  | Hasval of index * IndexSet.t

and module Index =
struct
  type t = index
  let compare i j = i.index_key - j.index_key
end

and module IndexSet = Set.Make(Index)

Does someone see a solution ? ( I have a soliution using Obj.t ... But
it is not reasonnable)
 
-- 
Christophe Raffalli
Université de Savoie
Batiment Le Chablais, bureau 21
73376 Le Bourget-du-Lac Cedex

tél: (33) 4 79 75 81 03
fax: (33) 4 79 75 87 42
mail: Christophe.Raffalli@univ-savoie.fr
www: http://www.lama.univ-savoie.fr/~RAFFALLI



  reply	other threads:[~2000-06-30 15:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-06-28  9:44 David Chemouil
2000-06-28 17:09 ` David Brown
2000-06-28 17:29 ` Markus Mottl
2000-06-29 16:57   ` Pierre Weis
2000-06-30  9:22     ` Christophe Raffalli [this message]
2000-06-30 18:10       ` Jean-Christophe Filliatre
2000-06-29  8:55 ` David Mentré
2000-06-29  9:19 ` Daniel de Rauglaudre
2000-06-30  0:42   ` Max Skaller

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=395C66EA.645DA1F8@univ-savoie.fr \
    --to=christophe.raffalli@univ-savoie.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