Browse thread
convenient features
[
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: | Christophe Raffalli <Christophe.Raffalli@u...> |
| Subject: | Re: convenient features |
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