Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Re: [Caml-list] type var in functor instance?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Daniel_Bünzli <daniel.buenzli@e...>
Subject: Re: [Caml-list] type var in functor instance?

Accidentally I'm running into the same problem. I'd like to have a 
polymorphic Hashtbl that uses physical equality. Using Hashtbl.Make is 
not possible since the type t of the input signature HashedType has no 

More precisely I would like to have a key with the following type

type 'a 'b key = 'a option * 'b option

and the following equal function,

let equal k k' = match k, k' with
| (Some x, y), (Some x', y') -> if x == x' then y = y' else false
| _, _ -> k = k'

which tests for physical equality when the first component of the key 
is "Some" in both keys.

Any hints besides those already suggested ?


To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: