From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.7 required=5.0 tests=AWL,SPF_SOFTFAIL autolearn=disabled version=3.1.3 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 85B2FBC6B for ; Fri, 25 Jan 2008 00:07:19 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Aq4HAC+omEfAXQImh2dsb2JhbACCNY1vAQEBCAopnlY X-IronPort-AV: E=Sophos;i="4.25,246,1199660400"; d="scan'208";a="7194298" Received: from discorde.inria.fr ([192.93.2.38]) by mail1-smtp-roc.national.inria.fr with ESMTP; 25 Jan 2008 00:07:19 +0100 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id m0ON7IlV021539 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Fri, 25 Jan 2008 00:07:19 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Aq4HAC+omEfUnw6Elmdsb2JhbACCNY1vAQEBAQcEBgcKEQeeVg X-IronPort-AV: E=Sophos;i="4.25,246,1199660400"; d="scan'208";a="7194297" Received: from pih-relay05.plus.net ([212.159.14.132]) by mail1-smtp-roc.national.inria.fr with ESMTP; 25 Jan 2008 00:07:18 +0100 Received: from [80.229.56.224] (helo=beast.local) by pih-relay05.plus.net with esmtp (Exim) id 1JIBAC-0004Y2-5R for caml-list@inria.fr; Thu, 24 Jan 2008 23:07:16 +0000 From: Jon Harrop Organization: Flying Frog Consultancy Ltd. To: caml-list@inria.fr Subject: Working around the brittle bindings problem Date: Thu, 24 Jan 2008 21:40:06 +0000 User-Agent: KMail/1.9.7 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200801242140.06785.jon@ffconsultancy.com> X-Plusnet-Relay: aa1596555aadf3e1c26cbb94daf4e427 X-Miltered: at discorde with ID 47991A26.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; bindings:01 bindings:01 ocaml:01 compiler:01 functor:01 functor:01 lablgl:01 shim:98 frog:98 parameterize:01 automates:02 external:03 module:03 library:03 library:03 Just occurred to me that one possible solution to our brittle bindings problem might be to parameterize the whole library over the external calls that are made. That could at least make the compiled code dependent only upon the version of the OCaml compiler itself and not each separate library. Is it possible to do this using a functor? I might have to wrap the entire library in one giant functor but that would let the user apply the functor to a suitable library module in order to obtain a working implementation. Am I right in thinking that the result would depend only upon my interface and no upon the library itself (e.g. LablGL)? If this is correct then it is probably solvable. The next best solution would be to open source the shim that automates this gore. -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/products/?e