Re: About the usage of the Compilation Manager.

John Reppy <[email protected]>
Newsgroups gmane.comp.lang.sml.smlnj
Message-ID <[email protected]>
CM figures dependencies automatically, as long as you use the module
system.  All you need to do is define a "sources.cm" file

	Group is
	A.sml
	B.sml

and then run the command

	CM.make "sources.cm";

in the SML read-eval-print loop.

Note, however, that you must use modules to organize your code.  CM
does not handle core-language top-level definitions (the are good
technical reasons for this limitation).

See the CM manual for more information

	http://www.smlnj.org/doc/CM/index.html

Hope this helps.

	- John

On Jun 2, 2005, at 2:25 AM, Kwanghoon Choi wrote:

>
> Dear All,
>
> Would you please help me to use the Compilation Manager CM?
>
>
> Currently, I made a simple compiler whose target file is a ".sml".
> I wanted the source file of this compiler to use datatypes and
> function defintions defined in other ".sml" files.
>
> That is,
>
> A.sml  -  defines some datatype D and some function defintion F.
>
> B.src  -  uses D and F, and
>        -  is compiled by my compiler into B.sml.
>
> Finally, A.sml and B.sml are compiled into binaries by SML/NJ.
>
>
> However, in order to compile B.src into B.sml, I need to know what
> definitions are used by B.src, for example, due to type checking.
>
>
> Q1. Could I specify by CM the order of compilation so that A.sml will
>     be compiled first and B.src will then be compiled with the exported
>     definitions of A.sml?
>
> Q2. Moreover, how could I get a list of exported definitions of A.sml
>     to compile B.src, automatically or by any means I need to do?
>
>
> My situation seems to be more complicated than that of MLyacc and
> MLlex because the compilation of ".MLYacc" and ".MLLex" itself does
> not need any exported definitions of other ".sml" files.
>
>
>
>
> Best regards,
>
>
> K. Choi
>
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by Yahoo.
> Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
> Search APIs Find out how you can build Yahoo! directly into your own
> Applications - visit 
> http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
> _______________________________________________
> Smlnj-list mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/smlnj-list
>



-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.