Here is an example of using 'absreimpl': #include "share\ atspre_staload.hats"
#staload "./abcde.sats" (* // This is the content of abcde.sats: abstype X = ptr local assume X = $tup(int, int) in end *) local absreimpl X in fun f(): X = $tup(0, 1) fun f0(x: X): int = x.0 fun f1(x: X): int = x.1 end implement main0() = let val x = f() in print!(f0(x) + f1(x)) end On Wednesday, October 17, 2018 at 1:11:00 AM UTC-4, gmhwxi wrote: > > I myself have seen this warning quite a few times. > > The reason is that some abstract type, say XYZ, is implemented in foo.dats. > After foo.dats gets staloaded, it is also included, which causes the > compiler to > complaint that XYZ gets implemented repeatedly. This is a harmless warning > (because you are not compiling foo.dats). > > If you want to suppress it, you can try to use absreimpl (or reassume). > > > On Wed, Oct 17, 2018 at 12:53 AM M88 <...> wrote: > >> Hello, >> >> This doesn't seem to affect compilation, but I often get this warning >> when attempting to link .dats files into mylibies_link.hats: >> "warning(3): the static constant [....] is not abstract at this point" >> >> This happens when I want to link a .dats file that implements abstract >> types. >> >> // mylibies.hats >> staload "./SATS/foo.sats" // expose the interface (declares abstract >> types) >> staload _ = "./DATS/foo.dats" // expose the templates (implements >> abstract types) >> >> // mylibies_link.hats >> local >> #include "./DATS/foo.dats" // link the file (for non-template functions, >> etc) >> in end >> >> It seems that all three declarations are necessary for compilation to >> succeed. There is no compilation error. >> >> Is this warning safe to ignore, and/or is there a preferred way of >> linking in this case? >> >> >> -- >> 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/9da1f4c4-136e-4885-8e24-6dcb3e5d9aa1%40googlegroups.com >> >> <https://groups.google.com/d/msgid/ats-lang-users/9da1f4c4-136e-4885-8e24-6dcb3e5d9aa1%40googlegroups.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 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/ee61e9f5-a6fa-438c-9031-6dd7ba085e48%40googlegroups.com.