caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] SML -> OCaml
@ 2001-12-08 18:50 Jurgen Botz
  2001-12-09  6:09 ` Daniel de Rauglaudre
  0 siblings, 1 reply; 3+ messages in thread
From: Jurgen Botz @ 2001-12-08 18:50 UTC (permalink / raw)
  To: caml-list

Is there an SML -> OCaml translator?  I have some SML programs I'd like
to convert... even something that only partly works would save me a fair
amount of tedium.

:j


-- 
Jürgen Botz                       | While differing widely in the various
jurgen@botz.org                   | little bits we know, in our infinite
                                  | ignorance we are all equal. -Karl Popper


-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] SML -> OCaml
  2001-12-08 18:50 [Caml-list] SML -> OCaml Jurgen Botz
@ 2001-12-09  6:09 ` Daniel de Rauglaudre
  2001-12-10 11:03   ` [Caml-list] Module and structure Christophe Raffalli
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel de Rauglaudre @ 2001-12-09  6:09 UTC (permalink / raw)
  To: caml-list

Hi,

On Sat, Dec 08, 2001 at 10:50:28AM -0800, Jurgen Botz wrote:

> Is there an SML -> OCaml translator?  I have some SML programs I'd like
> to convert... even something that only partly works would save me a fair
> amount of tedium.

You can try:
     camlp4 pa_sml.cmo pr_o.cmo your_file.ml

But it is probably incomplete: you may get syntax errors.
And even if it is ok, you probably have to change things by hands.
You can ask me if you want me to complete of fix some bugs.

-- 
Daniel de RAUGLAUDRE
daniel.de_rauglaudre@inria.fr
http://cristal.inria.fr/~ddr/
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Caml-list] Module and structure ...
  2001-12-09  6:09 ` Daniel de Rauglaudre
@ 2001-12-10 11:03   ` Christophe Raffalli
  0 siblings, 0 replies; 3+ messages in thread
From: Christophe Raffalli @ 2001-12-10 11:03 UTC (permalink / raw)
  Cc: caml-list


I am using module in a very extensive way in a program ... and I do not see
anything you can do
with structure taht you can not do with structure.

The only problems are syntactic (and I hope they will be fixed soon):

M(A).fied has to be written 
let module X = M(A) in X.field

functor (x:type) -> struct . . . end has to be written
functor (X:sig x:type end) -> struct open X... end (with extra modifications to
call the functor)

But then you can "open" a structure, share labels, use subtyping, and so on ...

Actually the "open M in" feature is missing but can be simulated by creating a
module:

open M in P := let module Result = struct open M let result = P end in
Result.result

So why not adding this open M in feature and the two others above has they are
only (almost) syntactic sugar ?

---

And then, why not replace structures by modules ? It would simplify the
compiler ?

would it be less efficient ? If yes, isn't it just a matter of optimisation ?

---

And then the next step is to merge module and object ... It may no be so
difficult but this looks
like research topic ...
 
-- 
Christophe Raffalli
Université de Savoie
Batiment Le Chablais, bureau 21
73376 Le Bourget-du-Lac Cedex

tél: (33) 4 79 75 81 03
fax: (33) 4 79 75 87 42
mail: Christophe.Raffalli@univ-savoie.fr
www: http://www.lama.univ-savoie.fr/~RAFFALLI
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-12-10 15:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-08 18:50 [Caml-list] SML -> OCaml Jurgen Botz
2001-12-09  6:09 ` Daniel de Rauglaudre
2001-12-10 11:03   ` [Caml-list] Module and structure Christophe Raffalli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).