Re: Building ATS that uses uint8

2020-10-23 Thread Dambaev Alexander
another option is to use uchar instead of uint8, at least until the missing
stuff for uint8 will be filled

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ats-lang-users/CAHjn2KxZFzuO6Zg4Athje_0-a2kkQBDDLT9gkSHCJp8awFEpXA%40mail.gmail.com.


Re: Building ATS that uses uint8

2020-10-23 Thread Hongwei Xi
The error message says that gint2uint is not implemented for the type uint8.
Of course, you can just implement it. Or you can just use the following
unsafe
approach to circumvent the issue:

#include "share/atspre_staload.hats"
#include "share/atspre_define.hats"

val
twelve =
$UNSAFE.cast(12): uint8(12)

implement main0 () = print!("twelve is ", twelve, "\n")


On Fri, Oct 23, 2020 at 5:36 PM Mark Barbone 
wrote:

>
> Hi all,
>
> I'm new to ATS, and trying to use the uint8 type.  However, when I do, I
> get long errors from GCC, involving PMVtmpltcstmat and friends:
> https://gist.github.com/mb64/eb9d194f3dedffd06d5cd075db316899
>
> The command I'm using to compile is:
> patscc -DATS_MEMALLOC_LIBC -o uint8_test uint8_test.dats
>
> How should I compile such a file using uint8?  Are there other files to
> #include, staload, or pass as command-line arguments?
> Or is my ATS installation completely borked?
>
> Thanks!
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/ats-lang-users/339ebe1e-8cd0-4192-a1ab-a66f24da36d1n%40googlegroups.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ats-lang-users/CAPPSPLoDYbKZ2h3RNE4uiEHzCNhjziJG7Lq_COP1n0Ya6h1ZGg%40mail.gmail.com.


Building ATS that uses uint8

2020-10-23 Thread Mark Barbone

Hi all,

I'm new to ATS, and trying to use the uint8 type.  However, when I do, I 
get long errors from GCC, involving PMVtmpltcstmat and friends: 
https://gist.github.com/mb64/eb9d194f3dedffd06d5cd075db316899

The command I'm using to compile is:
patscc -DATS_MEMALLOC_LIBC -o uint8_test uint8_test.dats

How should I compile such a file using uint8?  Are there other files to 
#include, staload, or pass as command-line arguments?
Or is my ATS installation completely borked?

Thanks!

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ats-lang-users/339ebe1e-8cd0-4192-a1ab-a66f24da36d1n%40googlegroups.com.