From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p0QGt7V2013689 for ; Wed, 26 Jan 2011 17:55:10 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtwAAL/gP03RVdivkGdsb2JhbACkcAgVAQEBAQkJDAcRBCCiLYoAgheFGC6IWQEBAwWFSgSMKYZd X-IronPort-AV: E=Sophos;i="4.60,380,1291590000"; d="scan'208";a="96853884" Received: from mail-qy0-f175.google.com ([209.85.216.175]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-MD5; 26 Jan 2011 17:55:10 +0100 Received: by qyk8 with SMTP id 8so5403753qyk.6 for ; Wed, 26 Jan 2011 08:55:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=uz0grK3h8/gqMI5FvPn4gC6rj9zemqtowluIB52povo=; b=ur+4AsCeVhmv0e0x4W3F4GOMetTOYQuUSmkrFw+pKy5Gv7wGCbEzt35J5XH6JRXFU2 1y39XNzLxtVJqZqrwOqCW8VqgLj7G1wIDthUXdnwe0NP8yhXhyF8E5kEW7G5lAeTZznt GqzbWVwnHWsNPFtA0uA68waZBQhT0CSWW0yNI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=csO7IYabJvJmEwoEEdhb3bf+LCqZGmx8vpscvplIQCIaZW71nHSVuINfQf3hakDyIX ZQa7a3e4lYRFzZfU8JVX8OZf3uiYWdt5M//aUfel3XGcjvlctBSqs8f7oFHb29hyYmgV pRWQbkgRZeypLaeXNt1bS7Gi8uLjdCsu4sELI= MIME-Version: 1.0 Received: by 10.229.91.147 with SMTP id n19mr563594qcm.153.1296060907614; Wed, 26 Jan 2011 08:55:07 -0800 (PST) Received: by 10.229.7.201 with HTTP; Wed, 26 Jan 2011 08:55:07 -0800 (PST) In-Reply-To: References: Date: Wed, 26 Jan 2011 16:55:07 +0000 Message-ID: From: Jeremy Yallop To: Julien Signoles Cc: Caml List Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [Caml-list] Converting "fun ... (type t) ..." into a caml < 3.12 code On 26 January 2011 12:58, Julien Signoles wrote: > How to convert the following ocaml 3.12 code into a typable ocaml < 3.12 > code? > I have a solution using Obj. Is it possible without Obj? There are safer approaches (than Obj) to a "universal type" described here: http://ocaml.janestreet.com/?q=node/18 Whether your problem can be solved with such an approach depends on how flexible your definition of "the same [type]" is. You can certainly write a function of the same type and behaviour as 'f' that way, though. Jeremy.