Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] how to write interface file for these two files?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Gu Nu <gnu04@y...>
Subject: [Caml-list] how to write interface file for these two files?
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!