gmhwxi
                
              
                
              
                  
                  
              1
              
             
            
              Yes, you need a  cast.On Thu, Jun 18, 2015 at 8:54 AM, Kiwamu Okabe kiw...@debian.or.jp wrote:
Hi all,
Today I read interfaces of libats/SATS/gfarray.sats.
fun{a:t@ype}
gfarray_set_at
{l:addr}
{x:int}{xs1:ilist}{xs2:ilist}
{i:int}
(
pf1: UPDATE (x, xs1, i, xs2)
, pf2: !gfarray_v (a, l, xs1) >> gfarray_v (a, l, xs2)
| p: ptr l, i: size_t i, x: stamped_t (a, x)
) :<!wrt> void // end of [gfarray_set_at]
The gfarray_set_at function need stamped_t (a, x) type to change
entity of the array.
How to create value of type stamped_t (a, x)?
Need to cast for it?
Best regards,
Kiwamu Okabe at METASEPI DESIGN
–
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/CAEvX6dkpUOnweJWKn1SQ7B0qpOJsWos3r_8OCT1%2B_Q6RzsuLnA%40mail.gmail.com
.
             
            
              
              
              
            
            
           
          
            
              
                gmhwxi
                
              
              
                  
                  
              2
              
             
            
              Done.
castfn stamp_t : {a:t@ype} (a) → [x:int] stamped_t(a, x)
castfn stamp_vt : {a:vt@ype} (a) → [x:int] stamped_vt(a, x)On Thursday, June 18, 2015 at 10:42:08 PM UTC-4, Kiwamu Okabe wrote:
On Fri, Jun 19, 2015 at 8:06 AM, Hongwei Xi <gmh...@gmail.com  <javascript:>> wrote:
The following function is a safe cast:
{a:t@ype} (a) → [x:int] stamped_t(a, x)
Use castfn?
How about define the function at prelude/basics_dyn.sats?
Kiwamu Okabe at METASEPI DESIGN
             
            
              
              
              
            
            
           
          
            
              
                gmhwxi
                
              
              
                  
                  
              3
              
             
            
              The following function is a safe cast:
{a:t@ype} (a) → [x:int] stamped_t(a, x)On Thu, Jun 18, 2015 at 9:18 AM, Hongwei Xi gmh...@gmail.com wrote:
Yes, you need a  cast.
On Thu, Jun 18, 2015 at 8:54 AM, Kiwamu Okabe kiw...@debian.or.jp wrote:
Hi all,
Today I read interfaces of libats/SATS/gfarray.sats.
fun{a:t@ype}
gfarray_set_at
{l:addr}
{x:int}{xs1:ilist}{xs2:ilist}
{i:int}
(
pf1: UPDATE (x, xs1, i, xs2)
, pf2: !gfarray_v (a, l, xs1) >> gfarray_v (a, l, xs2)
| p: ptr l, i: size_t i, x: stamped_t (a, x)
) :<!wrt> void // end of [gfarray_set_at]
The gfarray_set_at function need stamped_t (a, x) type to change
entity of the array.
How to create value of type stamped_t (a, x)?
Need to cast for it?
Best regards,
Kiwamu Okabe at METASEPI DESIGN
–
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/CAEvX6dkpUOnweJWKn1SQ7B0qpOJsWos3r_8OCT1%2B_Q6RzsuLnA%40mail.gmail.com
.