From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: weis Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id VAA09899 for caml-redistribution; Thu, 9 Dec 1999 21:30:01 +0100 (MET) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id MAA27802 for ; Thu, 9 Dec 1999 12:20:04 +0100 (MET) Received: from spivey.oriel.ox.ac.uk (spivey.oriel.ox.ac.uk [163.1.147.42]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id MAA29033 for ; Thu, 9 Dec 1999 12:20:02 +0100 (MET) Received: from mike by spivey.oriel.ox.ac.uk with local (Exim 2.05 #1) id 11w1cA-0001uZ-00; Thu, 9 Dec 1999 11:20:02 +0000 From: Mike Spivey To: caml-list@inria.fr Subject: Deriving a polymorphic mapping module Message-Id: Sender: weis Date: Thu, 9 Dec 1999 11:20:02 +0000 Given the functor-based Map module in the standard library of OCaml, is there any way of defining polymorphic mappings, like the old module provided with Caml Light, that has a polymorphic interface and always uses the polymorphic compare function? If not, then this seems to me to be a weakness in the module system. Looking at the Hashtbl module, I see that it in fact contains two completely independent implementations of hash tables, one polymorphic and one using a functor, so I guess the answer is 'no'. -- Mike Spivey ----8<--------8<--------8<--------8<--------8<--------8<--------8<---- Mauvaise traduction francaise: Etant donne la module Map du bibliotheque standardise de OCaml, existe-t-il aucune facon de definer des mappings polymorphes, comme l'ancien module map de Caml Light, qui a une interface polymorphe, et utilise toujours la fonction compare polymorphe? Si ca n'existe pas, ce me semble une faiblesse de la systeme de modules. En regardant la module Hashtbl, je vois qu'il contient en effet deux implantations des hash tables, l'une polymorphe et l'autre basee sur un functor. Donc, je crois que la reponse est 'non'.