[plt-scheme] Standard ML in PLT Scheme

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Thu Dec 20 14:36:00 EST 2007

Are the denotations of 1 the same in ML as in Scheme? How about  
closures?

Conjecture: It looks like you have created an unsound hybrid  
language. I.e., unsound from the perspective of ML; its invariants  
can be undermined now.

-- Matthias




On Dec 20, 2007, at 2:28 PM, Chongkai Zhu wrote:

> ML structure is mapped to PLT unit; ML signature is just signature  
> of PLT unit.
>
> #lang sml
> structure foo =
>  ...
>
> will be treat as
>
> (module foo@ (lib "ml.ss" "sml")
>  (provide foo@)
>  (provide sig ...)
>  (define-signature sig ...)
>  (define-unit-binding foo@ ...))
>
> So to import such a ML structure in Scheme, you need to
>
> (require foo@)
> (define-values/invoke-unit/infer foo@)
>
> I just uploaded another "sml.plt" to the webpage, which contains a  
> "collects/sml/lib/" directory. Under the directory there is a ML  
> structure translated into Scheme (a .sig file and a .ss file)
>
> Trying the following in MzScheme:
>
> #lang sml
> structure bar :> sig val x : int end =
>  struct
>    open foo
>  end
>
> Seeing "foo", which is not previously defined, the compiler will go  
> to the "collects/sml/lib/" directory to load the file. The "foo at .ss/ 
> sig" file can be generated from ML code, or can be any Scheme code  
> that meets the interface.
>
> Chongkai
>
>
> Matthias Felleisen wrote:
>> Nice. Could you demonstrate how SML and Scheme modules/units can  
>> import/export from each other? -- Matthias
>>
>>
>> On Dec 20, 2007, at 9:32 AM, Chongkai Zhu wrote:
>>
>>> We are pleased to announce the first public release of Standard  
>>> ML in DrScheme. The objective of this project is to provide a  
>>> development environment that the user can easily write a project  
>>> partly in SML and partly in Scheme.
>>>
>>> For more information, installation instructions, and sample  
>>> please check out the project web site:
>>>
>>>  http://www.cs.utah.edu/~czhu/sml.htm
>>>
>>> All comments, suggestions for enhancements, bug reports, etc. are  
>>> welcome!
>>>
>>> Cheers,
>>> Chongkai Zhu
>>>
>>> _________________________________________________
>>>  For list-related administrative tasks:
>>>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>



Posted on the users mailing list.