error: use of undeclared identifier 'PMVtmpltcstmat'

88 views
Skip to first unread message

Shea Levy

unread,
Aug 31, 2014, 1:47:28 AM8/31/14
to ats-lan...@googlegroups.com
Hi all,

When compiling dynamic/socket-activate.dats [1] to
socket-activate_dats.o, I get the error at [2]. I don't know how to
parse it, how should I proceed?

[1]: https://github.com/shlevy/socket-activate/blob/WIP/dynamic/socket-activate.dats
[2]: https://github.com/shlevy/socket-activate/blob/WIP/compile-log

~Shea

Alex Miller

unread,
Aug 31, 2014, 1:57:46 AM8/31/14
to ats-lang-users
Throw a

    #include "share/atspre_staload.hats" 

at the top of your .dats file.

It has something to do with being unable to resolve overloads (= and ~ for ints in your program).



~Shea

--
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-user...@googlegroups.com.
To post to this group, send email to ats-lan...@googlegroups.com.
Visit this group at http://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/20140831054725.GI7772%40nixos.hsd1.nh.comcast.net.

gmhwxi

unread,
Aug 31, 2014, 10:20:09 AM8/31/14
to ats-lan...@googlegroups.com
Some suggestions:

1. It is a good idea to type-annotate if-expressions (and also
case-expressions). For instance,

val ret = (if ... then ... else ...): int

2. The function get_error is better to be given following interface:

fun get_error (pf: ... | (*none*))

This allows a reader to quickly tell its first and only argument is a proof.

Shea Levy

unread,
Aug 31, 2014, 11:24:20 AM8/31/14
to ats-lan...@googlegroups.com
Thanks! I still needed the '#include "share/atspre_staload.hats"', is
that expected? When is that include needed?
> --
> 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-user...@googlegroups.com.
> To post to this group, send email to ats-lan...@googlegroups.com.
> Visit this group at http://groups.google.com/group/ats-lang-users.
> To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/3d451fd2-0460-482d-986b-dda2e18ae9d2%40googlegroups.com.

gmhwxi

unread,
Aug 31, 2014, 11:54:07 AM8/31/14
to ats-lan...@googlegroups.com
The following line tells the compiler where to find implementation
for the templates used in the code:

#include "share/atspre_staload.hats

If you wanted to generate, say, Python code, then a different source
of implementation for templates would be needed.

Shea Levy

unread,
May 8, 2015, 2:46:14 PM5/8/15
to ats-lan...@googlegroups.com
Hello all,

I’m getting this error again when compiling [1], which already includes the
#include. What else might be causing this?

Thanks,
Shea

[1] https://github.com/wdblair/ATS-Postiats-contrib/blob/3f6c981124de1f693984017c54bd9636330c6a25/projects/MEDIUM/ATS-extsolve/solving/solver_s2cstmap.dats
> To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/80f6ef5a-0c4d-410b-9c4c-a43418914818%40googlegroups.com.

gmhwxi

unread,
May 8, 2015, 3:05:19 PM5/8/15
to ats-lan...@googlegroups.com

By checking the error message, you could probably find out which
function template was involved in this case.

By the way, I am working on patsolve for the moment. I suggest that
you wait for a week or so until I finish overhauling it.

A separate issue:

As compiling ATS code may not be entirely trivial, people releasing packages
in ATS should probably consider releasing a C version (generated from ATS source)
as well.

ATS is like a Ferrari. Don't just use it like Camry :)

Shea Levy

unread,
May 9, 2015, 11:17:58 AM5/9/15
to ats-lan...@googlegroups.com
I see, thanks. I’ll wait a week then :)
> To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/5cc02a41-0ca2-4b71-a91c-85308d5dc90d%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages