Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] including signature (mli) in struct (ml)
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Shaddin Doghmi <shaddin@m...>
Subject: [Caml-list] including signature (mli) in struct (ml)
let us say i have the following functor in a.ml:

module Make(In:sig blah end):Aout =blahblah

and the following functor in b.ml, which takes as input Aout:

module Make(In:Aout):Bout = blahblah

so basically, i have to be able to refer to Aout in b.ml . what im 
having to do is define Aout in a.ml using:

module type Aout = sig blahblah end

and then repeating that definition in a.mli in order to export Aout so i 
can refer to it in b.ml

this redundancy can be annoying, is there a way to declare Aout only 
once and still be able to refer to it in b.ml ? How about including 
a.mli in a.ml somehow? something along the lines of include in C would 
do it, where including a.h in a.c would make it unnecessary to define 
something in both...

-------------------
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