Re: Defining a library in one file
Carl Gay <[email protected]> Sat, 18 Jan 2014 20:57:02 -0500
| Newsgroups | gmane.comp.lang.dylan.gwydion.devel |
|---|---|
| Message-ID | <CALekcH3Y5BrpJPnwiWwNa2VbGhZ3sacNDBVe8NObQ__e40Kt4g@mail.gmail.com> |
I just want to archive this here. Here's an example of a library that can
be compiled today in OD with just a LID file and one Dylan source file.
(The used libraries must already have been compiled, due to a bug.)
--------onefile.lid-------
Library: onefile
Files: onefile
--------onefile.dylan--------
Module: onefile
define library onefile
use common-dylan;
use io;
end library;
define module onefile
use common-dylan, exclude: { format-to-string };
use format-out;
end module;
define function main (name :: <string>, arguments :: <vector>)
format-out("Hello, world!\n");
exit-application(0);
end function main;
main(application-name(), application-arguments());
On Sat, Feb 16, 2013 at 11:00 PM, Carl Gay <[email protected]> wrote:
> Hi. I would like to get feedback on a proposal for a way to define Dylan
> libraries with a single file rather than the current minimum three files:
> LID file, library file, main program file. You can read it formatted<https://github.com/cgay/website/blob/single-file-library-dep/source/proposals/dep-0006.rst> and
> reply here with your comments, or plain<https://github.com/dylan-lang/website/pull/40/files>and leave your comments directly in the document. The latter requires a
> github account.
>
> Thanks.
> -Carl
>
>
_______________________________________________
hackers mailing list
[email protected]
https://lists.opendylan.org/mailman/listinfo/hackers