(************************************************************ restrictHashValueType.ml Created : Fri Jul 19 13:54:14 2002 Last modified: Fri Jul 19 13:59:58 2002 Compile: make # ************************************************************) module HashedString = struct type t = string let equal x y = x = y let hash x = Hashtbl.hash x end (* application of functor *) module StringHash = Hashtbl.Make(HashedString) (* restrict value type *) let a = ((StringHash.create 100) : string StringHash.t) let b = ((StringHash.create 100) : int StringHash.t)