From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id BAA18615; Mon, 28 Jun 2004 01:01:29 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id BAA18568 for ; Mon, 28 Jun 2004 01:01:28 +0200 (MET DST) Received: from web60905.mail.yahoo.com (web60905.mail.yahoo.com [216.155.196.81]) by nez-perce.inria.fr (8.12.10/8.12.10) with SMTP id i5RN1REV009960 for ; Mon, 28 Jun 2004 01:01:27 +0200 Message-ID: <20040627230126.86986.qmail@web60905.mail.yahoo.com> Received: from [128.110.251.74] by web60905.mail.yahoo.com via HTTP; Sun, 27 Jun 2004 16:01:26 PDT Date: Sun, 27 Jun 2004 16:01:26 -0700 (PDT) From: Gu Nu Subject: [Caml-list] how to write interface file for these two files? To: caml-list@inria.fr MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-402706304-1088377286=:83401" X-Miltered: at nez-perce with ID 40DF51C7.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; val:01 val:01 promotions:99 int:01 int:01 explicitly:03 explicitly:03 interface:03 interface:03 let:04 let:04 efficiency:05 gnu:05 functions:05 functions:05 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk --0-402706304-1088377286=:83401 Content-Type: text/plain; charset=us-ascii Hi, all I have a question on writing the interface file. A.ml type t = { x: int; y: int};; let f c = c.x + c.y;; B.ml let val = {A.x =1 ; A.y = 2};; A.f val;; open A;; f val;; How to write a interface file for B.ml, in which no functions are explicitly defined? Thanks a lot! Andy --------------------------------- Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! --0-402706304-1088377286=:83401 Content-Type: text/html; charset=us-ascii
Hi, all
 
I have a question on writing the interface file.
 
A.ml
 
type t = { x: int; y: int};;
let f c = c.x + c.y;;
 
B.ml
 
let val = {A.x =1 ; A.y = 2};;
A.f val;;
open A;;
f val;;
 
How to write a interface file for B.ml,
in which no functions are explicitly defined?
 
Thanks a lot!
 
Andy


Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage! --0-402706304-1088377286=:83401-- ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners