Date: Mon, 17 May 1999 19:53:39 -0400 (EDT)
From: Benoit deBoursetty <firstname.lastname@example.org>
To: Caml mailing list <email@example.com>
Subject: modification to the O'CaML sets.ml
Those who need the 1-type-variable polymorphic set data structure I've
talked of recently will find this file useful :
!! Warning !! The URL will stop being effective at the beginning of July.
Would anyone download this very small file to a more persistent website ?
It is a small modification to the original set.ml
In fact, only type declarations are modified, the code is just the same.
Doesn't this mean that the compiler polymorphism handling could be
In the case of sets I feel like declaring something like
(* This is not valid o'caml *)
module type 'a Comparison =
val compare : 'a -> 'a -> int
and a functor from modules with type 'a Comparison to modules with type
(* Neither is this *)
module type 'a Set =
type 'a t
val empty: 'a t
val is_empty: 'a t
val mem: 'a -> 'a t -> bool
val add: 'a -> 'a t -> 'a t
That is only my personal, programmer's point of view. I don't know of the
typing problems behind it.
Benoit de Boursetty
This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:22 MET