--- In ocaml_beginners%40yahoogroups.com">ocaml_beginners
yahoogroups.com, "jshaw10" <jshaw10
...> wrote:
>
> 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
.