caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* SML->OCaml
@ 2005-03-06 20:03 Konstantine Arkoudas
  2005-03-06 22:15 ` [Caml-list] SML->OCaml Martin Jambon
  0 siblings, 1 reply; 8+ messages in thread
From: Konstantine Arkoudas @ 2005-03-06 20:03 UTC (permalink / raw)
  To: caml-list

I'm thinking about re-implementing a fairly large SML-NJ project
(> 20K lines) in OCaml. Is anybody aware of any tools capable 
of automatically translating SML code into OCaml, at least 
partially? Any info would be appreciated. Thanks.

-- K. A. 



^ permalink raw reply	[flat|nested] 8+ messages in thread
* RE: [Caml-list] SML->OCaml
@ 2005-03-07  2:14 Harrison, John R
  2005-03-07 21:39 ` Martin Jambon
  0 siblings, 1 reply; 8+ messages in thread
From: Harrison, John R @ 2005-03-07  2:14 UTC (permalink / raw)
  To: caml-list; +Cc: Harrison, John R

Does this version do anything about SML programs that violate OCaml's
"uppercase identifier" convention? I recently tried something similar,
and while it did a competent job of parsing most of the syntax of SML,
it just reported errors for SML value bindings starting with an
uppercase letter. It would be nice if it just mapped such names to
"lowercase_XXX" or something so that the result could at least be
compiled. Or is that too "context sensitive" to be easy?

John.

-----Original Message-----
From: caml-list-admin@yquem.inria.fr
[mailto:caml-list-admin@yquem.inria.fr] On Behalf Of Martin Jambon
Sent: Sunday, March 06, 2005 2:16 PM
To: Konstantine Arkoudas
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] SML->OCaml

On Sun, 6 Mar 2005, Konstantine Arkoudas wrote:

> I'm thinking about re-implementing a fairly large SML-NJ project
> (> 20K lines) in OCaml. Is anybody aware of any tools capable
> of automatically translating SML code into OCaml, at least
> partially? Any info would be appreciated. Thanks.

It exists but it is in the "unmaintained" section of camlp4:
  http://camlcvs.inria.fr/cgi-bin/cvsweb/ocaml/camlp4/unmaintained/sml/


Martin

--
Martin Jambon, PhD
Researcher in Structural Bioinformatics since the 20th Century
The Burnham Institute http://www.burnham.org
San Diego, California


_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


^ permalink raw reply	[flat|nested] 8+ messages in thread
* RE: [Caml-list] SML->OCaml
@ 2005-03-08 18:17 Harrison, John R
  2005-03-08 22:54 ` Andreas Rossberg
  0 siblings, 1 reply; 8+ messages in thread
From: Harrison, John R @ 2005-03-08 18:17 UTC (permalink / raw)
  To: Andreas Rossberg; +Cc: caml-list

Andreas Rossberg writes:

| In fact, it would be much more complicated. First, identifier
| status is scoped. Constructors are frequently defined locally. In
| particular, this may happen implicitly through the use of "open".
| To derive the required information you hence needed to perform a
| complete binding analysis, including modules and signatures.
| [...]

Thanks, that's a good explanation. Ocaml's case convention almost
starts to look like a good idea when you see the alternatives...

| In summary, to deal with constructor status correctly (not to mention
| stuff like datatype replication, local, records, user-defined fixity,
| etc.) you basically need half an SML frontend. It seems out of scope
| for a Camlp4 hack to be more than a simple approximation.

Can you recommend any SML frontend that I could, more or less
trivially, use to systematically munge uppercase identifier names and
spit out the program again?

John.


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

end of thread, other threads:[~2005-03-11  8:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-06 20:03 SML->OCaml Konstantine Arkoudas
2005-03-06 22:15 ` [Caml-list] SML->OCaml Martin Jambon
2005-03-07  2:14 Harrison, John R
2005-03-07 21:39 ` Martin Jambon
2005-03-08  9:11   ` Andreas Rossberg
2005-03-08 18:17 Harrison, John R
2005-03-08 22:54 ` Andreas Rossberg
2005-03-11  8:31   ` Norman Scaife

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