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 q26HXbv0024750 for ; Tue, 6 Mar 2012 18:33:37 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsECAK1JVk/B/BfTkWdsb2JhbABDgxaCK6w6gyQBAQEBCQsLBxQDJIF9AQEFIw8BBUABEAkCGAICBRYLAgIJAwIBAgFFBg0BBwEBiAetVopNgS+OGYEWBJU/hWONFw X-IronPort-AV: E=Sophos;i="4.73,540,1325458800"; d="scan'208";a="147875019" Received: from msa02.smtpout.orange.fr (HELO msa.smtpout.orange.fr) ([193.252.23.211]) by mail1-smtp-roc.national.inria.fr with ESMTP; 06 Mar 2012 18:33:32 +0100 Received: from [192.168.1.105] ([86.195.134.228]) by mwinf5d60 with ME id iHZX1i00C4vqAHy03HZXRy; Tue, 06 Mar 2012 18:33:32 +0100 Message-ID: <4F564A69.9040503@frisch.fr> Date: Tue, 06 Mar 2012 18:33:29 +0100 From: Alain Frisch User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: =?UTF-8?B?TWF0ZWogS2/FocOtaw==?= <5764c029b688c1c0d24a2e97cd764f@gmail.com> CC: caml-list@inria.fr References: <4F563DA3.5050201@gmail.com> In-Reply-To: <4F563DA3.5050201@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Caml-list] crazy ocaml compiler implementation question On 03/06/2012 05:38 PM, Matej Košík wrote: > Hello, > > In the file: > > typing/path.mli > > contains the following definition: > > type t = > Pident of Ident.t > | Pdot of t * string * int > | Papply of t * t > > What is the semantics of third parameter? > > In the implementation I see it either ignored or passed verbatime around > but I have failed to spot a place where it is actually used for > something so I failed to figure out its meaning. See Lambda.transl_path. The third parameters give the position of the component in its containing structure, at runtime (a structure is represented as a block, like a record). It should be nopos for components that have no runtime representations (like types and module types declarations). -- Alain