List Info

Thread: "ocaml_beginners"::[] Re: Replacing module without replacing file




"ocaml_beginners"::[] Re: Replacing module without replacing file
country flaguser name
United States
2007-03-20 23:43:09

--- In ocaml_beginners%40yahoogroups.com">ocaml_beginnersyahoogroups.com, "jshaw10" <jshaw10...> wrote:
&gt;
> I'm not 100% sure this will work. You might have to turn off some
>; compiler warnings or something.
>

In fact, I already use something like this in one of my Ocaml projects,
where I have a module "Rational" that can be implemented either
by quotients of ordinary ints or Big_ints from the standard library. And it
works fine. The only incovenience is that when you switch
implementations the files (...)_Version_A.cmo and (...)_Version_B.cmo
have to be deleted (so that the compiler
will reconstruct them) before recompiling (otherwise you get an error message
like "Module X and module Y disagree over the interface Y").

Ewan

__._,_.___
.

__,_._,___
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )