Version française
Home     About     Download     Resources     Contact us    
Browse thread
Checking an interface against an implementation
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Daniel_Bünzli <daniel.buenzli@e...>
Subject: Checking an interface against an implementation
Hello,

Is there a compiler invocation that allows to check that a particular  
cmo or cmx implements a given cmi ?

I have some compilation units which are completely transparent to  
each other (i.e no .mli). However for the final client of these units  
I provide constrained interfaces specified in another directory.  For  
example,

mylib/a.ml
mylib/b.ml
mylib/api/a.mli
mylib/api/b.mli

Whenever I compile an .mli to a .cmi I would like to check that its  
corresponding .cmo implements it. The problem is that syntactically  
correct cmi always compile whithout problems. So if my .cmo doesn't  
implement my .cmi I only get an (uninformative) error when I try to  
actually link these units with the client.

Thanks for your answers,

Daniel