From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id B3327BBAF for ; Sat, 12 Jul 2008 20:59:00 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlYBAEqceEiCcYARgWdsb2JhbACSLAEBEA0Tlko X-IronPort-AV: E=Sophos;i="4.30,350,1212357600"; d="scan'208";a="15058161" Received: from coriana6.cis.mcmaster.ca ([130.113.128.17]) by mail3-smtp-sop.national.inria.fr with ESMTP; 12 Jul 2008 20:58:37 +0200 Received: from Gorash7.UTS.McMaster.CA (Gorash7.UTS.mcmaster.ca [130.113.196.61]) by coriana6.cis.mcmaster.ca (8.13.7/8.13.7) with ESMTP id m6CIwPoT007683; Sat, 12 Jul 2008 14:58:30 -0400 (EDT) Received: from cgpsrv2.cis.mcmaster.ca (univmail.CIS.McMaster.CA [130.113.64.46]) by Gorash7.UTS.McMaster.CA (8.13.7/8.13.7) with ESMTP id m6CIw4ke028939; Sat, 12 Jul 2008 14:58:04 -0400 Received: from [72.138.80.237] (account carette@univmail.cis.mcmaster.ca HELO [192.168.1.100]) by cgpsrv2.cis.mcmaster.ca (CommuniGate Pro SMTP 4.3.12) with ESMTPSA id 217604809; Sat, 12 Jul 2008 14:58:04 -0400 Message-ID: <4878FEBE.9000807@mcmaster.ca> Date: Sat, 12 Jul 2008 14:58:06 -0400 From: Jacques Carette Organization: McMaster University User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: Wolfgang Lux Cc: Dario Teixeira , caml-list@yquem.inria.fr Subject: Re: [Caml-list] Troublesome nodes References: <197205.74716.qm@web54603.mail.re2.yahoo.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Version-Mac: 5.4.2.338381, Antispam-Engine: 2.6.0.325393, Antispam-Data: 2008.7.12.184700 X-PerlMx-Spam: Gauge=IIIIIII, Probability=7%, Report='BODY_SIZE_1000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_500_599 0, __BOUNCE_CHALLENGE_SUBJ 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __USER_AGENT 0' X-Spam-Flag: NO X-Spam: no; 0.00; nodes:01 node:01 val:01 node:01 seq:01 seq:01 module's:01 coercions:01 subtype:01 annotations:01 wrote:01 caml-list:01 coercion:01 argument:02 mcmaster:02 Wolfgang Lux wrote: > This problem is apparently easy to solve. Just don't expect an exact > super_node_t list argument for the bold function. Instead use > val bold : [< super_node_t] list -> nonlink_node_t > in the signature and > let bold seq = `Bold (seq :> super_node_t list) > in the body of the Node module's definition. Indeed, works like a charm. You don't even need the coercion in the body of 'bold' for it to work. This will hopefully allow me to remove some coercions from my own code, and use subtype annotations in the types. Jacques