I just played with it on my ats-utils package. I published it here, https://www.npmjs.com/package/ats-utils so that others can try out. It is under MIT license.
On Tuesday, January 3, 2017 at 2:45:09 PM UTC-5, gmhwxi wrote: > > > > ###### > # > # For the moment, I am using ats-lang-users for ats-lang-devel. > # > ###### > > For people interested in this, please feel free to post your comments. > > In the near future, I hope to set up a packaging system for ATS. It is > long overdue. > > I looked around and tried npm (JS) and composer (PHP). For the moment, > I plan to use npm (but this choice should have minimal impact, if at all, > on > the support for packaging system in ATS). > > One can say that being explicit is a theme in the design of ATS. There is > no exception this time. A environment variable PATSHOMERELOCS is to > be introduced (which may or may not replace the variable PATSHOMERELOC > that is currently in use). > > PATSHOMERELOCS is essentially a collection of paths separation by colon (:) > (or other characters). > > Say that you have used npm to install a package FOO globally. Then you may > have > > /usr/local/lib/node_modules/ > FOO > > on your system. > > Please make sure that /usr/local/lib/node_modules is one of the paths in > PATSHOMERELOCS. > > You may use FOO in your code in the following ways: > > #include "${PATSHOMERELOCS}/FOO/foo.hats" > #staload "${PATSHOMERELOCS}/FOO/foo.sats" > #staload _ = "${PATSHOMELOCS}/FOO/foo.hats" > > By mentioning PATSHOMERELOCS in a loading path is what I refer to as being > explicit. > > This should address the issue of compilation to C involving external > packages. Obviously, we also > need to compile the generated C code into object files. This latter issue > can be addressed by making > use of pkg-config properly. We just need some experiments and then form > certain guidelines for doing it. > > Cheers! > > > -- You received this message because you are subscribed to the Google Groups "ats-lang-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to ats-lang-users+unsubscr...@googlegroups.com. To post to this group, send email to ats-lang-users@googlegroups.com. Visit this group at https://groups.google.com/group/ats-lang-users. To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/fe68ffd2-83ae-4b4c-9d79-cb6fe5991625%40googlegroups.com.