*'#include' means copy/paste. It is not meant to be used*

*in the following manner:*

*```glib-ext.sats*


*#include "contrib/glib/SATS/glib.sats"#include
"contrib/glib/SATS/glib-object.sats" (* staloads glib.sats *)*
*```*

*You can create glib-ext.hats containing the following lines:*


*#staload "contrib/glib/SATS/glib.sats"#staload
"contrib/glib/SATS/glib-object.sats" (* staloads glib.sats *)*

*Then add the following line*


*#include "glib-ext.hats"*

*This allows you to staload both glib.sats and glib-object.sats*

*Here is a real example:*

*https://github.com/githwxi/ATS-Postiats/blob/master/share/HATS/atspre_staload_prelude.hats
<https://github.com/githwxi/ATS-Postiats/blob/master/share/HATS/atspre_staload_prelude.hats>*


*By the way, '#staload' is idempotent. Staloading a file multiple times
causes NO problems:*

*#staload "contrib/glib/SATS/glib.sats"*
*#staload "contrib/glib/SATS/glib.sats"*



On Mon, Aug 31, 2020 at 5:30 AM Dambaev Alexander <[email protected]>
wrote:

> *Kiwamu: *wow, thanks for your trust, but after my quick view of your
> wiki page
> http://jats-ug.metasepi.org/doc/ATS2/ATS_Foundations/showtype.html and at
> the moment, I don't think, that I can add much more to it
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *Hongwei: thanks, you are right. glib's bindings provide 2 separate SATS
> files: glib.sats and glib-object.sats, so I created a sats file, in which I
> had included those 2 SATS files with '#include' pragma and used this one
> sats file for staloading. I wanted to get this:```main.datsstaload
> GLIB="glib-ext.sats"(* $GLIB.glib1 available here *)(* $GLIB.glib2
> available here *)``````glib-ext.sats#include
> "contrib/glib/SATS/glib.sats"#include "contrib/glib/SATS/glib-object.sats"
> (* staloads glib.sats *)``````contrib/glib/SATS/glib.satsfn
> glib1():void``````contrib/glib/SATS/glib-object.satsfn glib2():void``` So
> for now I have to staload them both in all modules, in which I need to use
> declarations from both. As far as I understand, there is no other way to
> achieve the same case without using #include pragma, am I right?Other than
> that, is it ok for compiler to not to throw an error of multiple
> declarations of gpointer?*
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ats-lang-users/CAHjn2KxAnsELa38_HvB49_YY2LmUOj6RVhbkc8oC3LXSJ6ubBg%40mail.gmail.com
> <https://groups.google.com/d/msgid/ats-lang-users/CAHjn2KxAnsELa38_HvB49_YY2LmUOj6RVhbkc8oC3LXSJ6ubBg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ats-lang-users/CAPPSPLr8RT%3DV5ocOuBd%2BVdGA9sXtNT73n4trGnce2G9WR6ckKw%40mail.gmail.com.

Reply via email to