# Tuples/Records in the statics

**URL:** <https://discourse.ats-lang.org/t/tuples-records-in-the-statics/547>\
**Category:** Google Group\
**Created:** [February 23, 2015, 7:19pm UTC](https://discourse.ats-lang.org/t/tuples-records-in-the-statics/547 "2015-02-23T19:19:56Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shea\_Levy](https://avatars.discourse-cdn.com/v4/letter/s/b38774/32.png) [@Shea\_Levy](https://discourse.ats-lang.org/u/Shea_Levy)\
**Post date:** [February 23, 2015, 7:19pm UTC](https://discourse.ats-lang.org/t/tuples-records-in-the-statics/547/1 "2015-02-23T19:19:56Z")

</div>

Hi all,

I know we have datasorts, but do we have something similar to build up tuples records of sorts? I know I can just use a single-constructor datasort, just wondering if there’s something more direct.

~Shea

---

<div class="post-metadata">

**Author:** ![Shea\_Levy](https://avatars.discourse-cdn.com/v4/letter/s/b38774/32.png) [@Shea\_Levy](https://discourse.ats-lang.org/u/Shea_Levy)\
**Post date:** [February 23, 2015, 8:56pm UTC](https://discourse.ats-lang.org/t/tuples-records-in-the-statics/547/2 "2015-02-23T20:56:23Z")

</div>

Is there any way to “unpack” datasorts, some kind of scase?\> On Feb 23, 2015, at 2:45 PM, Hongwei Xi [gmh...@gmail.com](mailto:gmh...@gmail.com) wrote:

> There is no direct support for tuples in the statics.
> 
> On Mon, Feb 23, 2015 at 2:19 PM, Shea Levy \<[sh...@shealevy.com](mailto:sh...@shealevy.com) [mailto:sh...@shealevy.com](mailto:sh...@shealevy.com)\> wrote:  
> Hi all,
> 
> I know we have datasorts, but do we have something similar to build up tuples records of sorts? I know I can just use a single-constructor datasort, just wondering if there’s something more direct.
> 
> ~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](mailto:ats-lang-user...@googlegroups.com) [mailto:ats-lang-users...@googlegroups.com](mailto:ats-lang-users...@googlegroups.com).  
> To post to this group, send email to [ats-lan...@googlegroups.com](mailto:ats-lan...@googlegroups.com) [mailto:ats-lan...@googlegroups.com](mailto:ats-lan...@googlegroups.com).  
> Visit this group at [http://groups.google.com/group/ats-lang-users](http://groups.google.com/group/ats-lang-users) [http://groups.google.com/group/ats-lang-users](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/B75CEE5A-16BC-472F-B044-5AB8277921EB%40shealevy.com](https://groups.google.com/d/msgid/ats-lang-users/B75CEE5A-16BC-472F-B044-5AB8277921EB%40shealevy.com) [https://groups.google.com/d/msgid/ats-lang-users/B75CEE5A-16BC-472F-B044-5AB8277921EB%40shealevy.com](https://groups.google.com/d/msgid/ats-lang-users/B75CEE5A-16BC-472F-B044-5AB8277921EB%40shealevy.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-user...@googlegroups.com](mailto:ats-lang-user...@googlegroups.com) [mailto:ats-lang-user...@googlegroups.com](mailto:ats-lang-user...@googlegroups.com).  
> To post to this group, send email to [ats-lan...@googlegroups.com](mailto:ats-lan...@googlegroups.com) [mailto:ats-lan...@googlegroups.com](mailto:ats-lan...@googlegroups.com).  
> Visit this group at [http://groups.google.com/group/ats-lang-users](http://groups.google.com/group/ats-lang-users) [http://groups.google.com/group/ats-lang-users](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/CAPPSPLoiXvgSx1OKTLo%2B3%3DN\_P0qqHvYaZ06kCEta30o9G-Ldfw%40mail.gmail.com](https://groups.google.com/d/msgid/ats-lang-users/CAPPSPLoiXvgSx1OKTLo%2B3%3DN_P0qqHvYaZ06kCEta30o9G-Ldfw%40mail.gmail.com) [https://groups.google.com/d/msgid/ats-lang-users/CAPPSPLoiXvgSx1OKTLo%2B3%3DN\_P0qqHvYaZ06kCEta30o9G-Ldfw%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/ats-lang-users/CAPPSPLoiXvgSx1OKTLo%2B3%3DN_P0qqHvYaZ06kCEta30o9G-Ldfw%40mail.gmail.com?utm_medium=email&utm_source=footer).

---

<div class="post-metadata">

**Author:** ![Shea\_Levy](https://avatars.discourse-cdn.com/v4/letter/s/b38774/32.png) [@Shea\_Levy](https://discourse.ats-lang.org/u/Shea_Levy)\
**Post date:** [February 24, 2015, 11:59am UTC](https://discourse.ats-lang.org/t/tuples-records-in-the-statics/547/3 "2015-02-24T11:59:52Z")

</div>

The ideal would be something like (for an ini parser I’m playing with):

sortdef loc\_and\_count = @{ loc = addr, count = int }  
vtypedef sized\_array (a:t@ype, lc:loc\_and\_count) = (@[a][lc.count]@[lc.loc]|@{ sz = int(lc.count), addr = ptr(lc.loc) })  
vtypedef ini\_entry (section\_lc: loc\_and\_count, key\_lc: loc\_and\_count, value\_lc: loc\_and\_count) = @{ section=sized\_array(section\_lc), key=sized\_array(key\_lc), value=sized\_array(value\_lc) }

Without records in the statics, something like this would be nice:

datasort loc\_and\_count = loc\_and\_count of (addr, int)  
vtypedef sized\_array (a:t@ype, lc:loc\_and\_count) = case lc of (l, i) → (@[a][i]@[l]|@{ sz = int(i), addr = ptr(l) })  
vtypedef ini\_entry (section\_lc: loc\_and\_count, key\_lc: loc\_and\_count, value\_lc: loc\_and\_count) = @{ section=sized\_array(section\_lc), key=sized\_array(key\_lc), value=sized\_array(value\_lc) }

These are of course just conveniences, but as it stands I need to name every static variable repeatedly.

Thanks,  
Shea\> On Feb 23, 2015, at 4:00 PM, Hongwei Xi [gmh...@gmail.com](mailto:gmh...@gmail.com) wrote:

> Could you write some pseudo code?
> 
> On Mon, Feb 23, 2015 at 3:56 PM, Shea Levy \<[sh...@shealevy.com](mailto:sh...@shealevy.com) [mailto:sh...@shealevy.com](mailto:sh...@shealevy.com)\> wrote:  
> Is there any way to “unpack” datasorts, some kind of scase?
> 
> > On Feb 23, 2015, at 2:45 PM, Hongwei Xi \<[gmh...@gmail.com](mailto:gmh...@gmail.com) [mailto:gmh...@gmail.com](mailto:gmh...@gmail.com)\> wrote:
> > 
> > There is no direct support for tuples in the statics.
> > 
> > On Mon, Feb 23, 2015 at 2:19 PM, Shea Levy \<[sh...@shealevy.com](mailto:sh...@shealevy.com) [mailto:sh...@shealevy.com](mailto:sh...@shealevy.com)\> wrote:  
> > Hi all,
> > 
> > I know we have datasorts, but do we have something similar to build up tuples records of sorts? I know I can just use a single-constructor datasort, just wondering if there’s something more direct.
> > 
> > ~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](mailto:ats-lang-user...@googlegroups.com) [mailto:ats-lang-users...@googlegroups.com](mailto:ats-lang-users...@googlegroups.com).  
> > To post to this group, send email to [ats-lan...@googlegroups.com](mailto:ats-lan...@googlegroups.com) [mailto:ats-lan...@googlegroups.com](mailto:ats-lan...@googlegroups.com).  
> > Visit this group at [http://groups.google.com/group/ats-lang-users](http://groups.google.com/group/ats-lang-users) [http://groups.google.com/group/ats-lang-users](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/B75CEE5A-16BC-472F-B044-5AB8277921EB%40shealevy.com](https://groups.google.com/d/msgid/ats-lang-users/B75CEE5A-16BC-472F-B044-5AB8277921EB%40shealevy.com) [https://groups.google.com/d/msgid/ats-lang-users/B75CEE5A-16BC-472F-B044-5AB8277921EB%40shealevy.com](https://groups.google.com/d/msgid/ats-lang-users/B75CEE5A-16BC-472F-B044-5AB8277921EB%40shealevy.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-user...@googlegroups.com](mailto:ats-lang-user...@googlegroups.com) [mailto:ats-lang-user...@googlegroups.com](mailto:ats-lang-user...@googlegroups.com).  
> > To post to this group, send email to [ats-lan...@googlegroups.com](mailto:ats-lan...@googlegroups.com) [mailto:ats-lan...@googlegroups.com](mailto:ats-lan...@googlegroups.com).  
> > Visit this group at [http://groups.google.com/group/ats-lang-users](http://groups.google.com/group/ats-lang-users) [http://groups.google.com/group/ats-lang-users](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/CAPPSPLoiXvgSx1OKTLo%2B3%3DN\_P0qqHvYaZ06kCEta30o9G-Ldfw%40mail.gmail.com](https://groups.google.com/d/msgid/ats-lang-users/CAPPSPLoiXvgSx1OKTLo%2B3%3DN_P0qqHvYaZ06kCEta30o9G-Ldfw%40mail.gmail.com) [https://groups.google.com/d/msgid/ats-lang-users/CAPPSPLoiXvgSx1OKTLo%2B3%3DN\_P0qqHvYaZ06kCEta30o9G-Ldfw%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/ats-lang-users/CAPPSPLoiXvgSx1OKTLo%2B3%3DN_P0qqHvYaZ06kCEta30o9G-Ldfw%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 [ats-lang-user...@googlegroups.com](mailto:ats-lang-user...@googlegroups.com) [mailto:ats-lang-user...@googlegroups.com](mailto:ats-lang-user...@googlegroups.com).  
> To post to this group, send email to [ats-lan...@googlegroups.com](mailto:ats-lan...@googlegroups.com) [mailto:ats-lan...@googlegroups.com](mailto:ats-lan...@googlegroups.com).  
> Visit this group at [http://groups.google.com/group/ats-lang-users](http://groups.google.com/group/ats-lang-users) [http://groups.google.com/group/ats-lang-users](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/A73DD363-CCD5-494C-92FB-BA11268D0486%40shealevy.com](https://groups.google.com/d/msgid/ats-lang-users/A73DD363-CCD5-494C-92FB-BA11268D0486%40shealevy.com) [https://groups.google.com/d/msgid/ats-lang-users/A73DD363-CCD5-494C-92FB-BA11268D0486%40shealevy.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/ats-lang-users/A73DD363-CCD5-494C-92FB-BA11268D0486%40shealevy.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-user...@googlegroups.com](mailto:ats-lang-user...@googlegroups.com) [mailto:ats-lang-user...@googlegroups.com](mailto:ats-lang-user...@googlegroups.com).  
> To post to this group, send email to [ats-lan...@googlegroups.com](mailto:ats-lan...@googlegroups.com) [mailto:ats-lan...@googlegroups.com](mailto:ats-lan...@googlegroups.com).  
> Visit this group at [http://groups.google.com/group/ats-lang-users](http://groups.google.com/group/ats-lang-users) [http://groups.google.com/group/ats-lang-users](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/CAPPSPLpH5RkJSax5E7LQ0jmonnSKWp1BiwF\_jr5pRVZT4Eke\_w%40mail.gmail.com](https://groups.google.com/d/msgid/ats-lang-users/CAPPSPLpH5RkJSax5E7LQ0jmonnSKWp1BiwF_jr5pRVZT4Eke_w%40mail.gmail.com) [https://groups.google.com/d/msgid/ats-lang-users/CAPPSPLpH5RkJSax5E7LQ0jmonnSKWp1BiwF\_jr5pRVZT4Eke\_w%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/ats-lang-users/CAPPSPLpH5RkJSax5E7LQ0jmonnSKWp1BiwF_jr5pRVZT4Eke_w%40mail.gmail.com?utm_medium=email&utm_source=footer).

---

<div class="post-metadata">

**Author:** ![gmhwxi](https://avatars.discourse-cdn.com/v4/letter/g/67e7ee/32.png) [@gmhwxi](https://discourse.ats-lang.org/u/gmhwxi)\
**Post date:** [February 25, 2015, 2:37pm UTC](https://discourse.ats-lang.org/t/tuples-records-in-the-statics/547/4 "2015-02-25T14:37:19Z")

</div>

You can introduce some constants:

stacst: loc : loc\_and\_count → addr  
stacst: count : loc\_and\_count → int

Then write lc.loc as loc(lc) and lc.count as count(lc).

What is a bit tricky is here is to tell the system of the following  
equalities  
when you need them:

loc(loc\_and\_count(l, c)) = l  
count(loc\_and\_count(l, c)) = cOn Tuesday, February 24, 2015 at 6:59:55 AM UTC-5, Shea Levy wrote:

> The ideal would be something like (for an ini parser I’m playing with):
> 
> sortdef loc\_and\_count = @{ loc = addr, count = int }  
> vtypedef sized\_array (a:t@ype, lc:loc\_and\_count) =  
> (@[a][lc.count]@[lc.loc]|@{ sz = int(lc.count), addr = ptr(lc.loc) })  
> vtypedef ini\_entry (section\_lc: loc\_and\_count, key\_lc: loc\_and\_count,  
> value\_lc: loc\_and\_count) = @{ section=sized\_array(section\_lc),  
> key=sized\_array(key\_lc), value=sized\_array(value\_lc) }
> 
> Without records in the statics, something like this would be nice:
> 
> datasort loc\_and\_count = loc\_and\_count of (addr, int)  
> vtypedef sized\_array (a:t@ype, lc:loc\_and\_count) = case lc of (l, i) →   
> (@[a][i]@[l]|@{ sz = int(i), addr = ptr(l) })  
> vtypedef ini\_entry (section\_lc: loc\_and\_count, key\_lc: loc\_and\_count,  
> value\_lc: loc\_and\_count) = @{ section=sized\_array(section\_lc),  
> key=sized\_array(key\_lc), value=sized\_array(value\_lc) }
> 
> These are of course just conveniences, but as it stands I need to name  
> every static variable repeatedly.
> 
> Thanks,  
> Shea
> 
> On Feb 23, 2015, at 4:00 PM, Hongwei Xi \<[gmh...@gmail.com](mailto:gmh...@gmail.com) \<javascript:\>\> wrote:
> 
> Could you write some pseudo code?
> 
> On Mon, Feb 23, 2015 at 3:56 PM, Shea Levy \<[sh...@shealevy.com](mailto:sh...@shealevy.com) \<javascript:\>\> wrote:
> 
> > Is there any way to “unpack” datasorts, some kind of scase?
> > 
> > On Feb 23, 2015, at 2:45 PM, Hongwei Xi \<[gmh...@gmail.com](mailto:gmh...@gmail.com) \<javascript:\>\> wrote:
> > 
> > There is no direct support for tuples in the statics.
> > 
> > On Mon, Feb 23, 2015 at 2:19 PM, Shea Levy \<[sh...@shealevy.com](mailto:sh...@shealevy.com) \<javascript:\>\> wrote:
> > 
> > > Hi all,
> > > 
> > > I know we have datasorts, but do we have something similar to build up  
> > > tuples records of sorts? I know I can just use a single-constructor  
> > > datasort, just wondering if there’s something more direct.
> > > 
> > > ~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...@googlegroups.com](mailto:ats-lang...@googlegroups.com) \<javascript:\>.  
> > > To post to this group, send email to [ats-l...@googlegroups.com](mailto:ats-l...@googlegroups.com)  
> > > \<javascript:\>.  
> > > Visit this group at [http://groups.google.com/group/ats-lang-users](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/B75CEE5A-16BC-472F-B044-5AB8277921EB%40shealevy.com](https://groups.google.com/d/msgid/ats-lang-users/B75CEE5A-16BC-472F-B044-5AB8277921EB%40shealevy.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...@googlegroups.com](mailto:ats-lang...@googlegroups.com) \<javascript:\>.  
> > To post to this group, send email to [ats-l...@googlegroups.com](mailto:ats-l...@googlegroups.com)  
> > \<javascript:\>.  
> > Visit this group at [http://groups.google.com/group/ats-lang-users](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/CAPPSPLoiXvgSx1OKTLo%2B3%3DN\_P0qqHvYaZ06kCEta30o9G-Ldfw%40mail.gmail.com](https://groups.google.com/d/msgid/ats-lang-users/CAPPSPLoiXvgSx1OKTLo%2B3%3DN_P0qqHvYaZ06kCEta30o9G-Ldfw%40mail.gmail.com)  
> > [https://groups.google.com/d/msgid/ats-lang-users/CAPPSPLoiXvgSx1OKTLo%2B3%3DN\_P0qqHvYaZ06kCEta30o9G-Ldfw%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/ats-lang-users/CAPPSPLoiXvgSx1OKTLo%2B3%3DN_P0qqHvYaZ06kCEta30o9G-Ldfw%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 [ats-lang...@googlegroups.com](mailto:ats-lang...@googlegroups.com) \<javascript:\>.  
> > To post to this group, send email to [ats-l...@googlegroups.com](mailto:ats-l...@googlegroups.com)  
> > \<javascript:\>.  
> > Visit this group at [http://groups.google.com/group/ats-lang-users](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/A73DD363-CCD5-494C-92FB-BA11268D0486%40shealevy.com](https://groups.google.com/d/msgid/ats-lang-users/A73DD363-CCD5-494C-92FB-BA11268D0486%40shealevy.com)  
> > [https://groups.google.com/d/msgid/ats-lang-users/A73DD363-CCD5-494C-92FB-BA11268D0486%40shealevy.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/ats-lang-users/A73DD363-CCD5-494C-92FB-BA11268D0486%40shealevy.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...@googlegroups.com](mailto:ats-lang...@googlegroups.com) \<javascript:\>.  
> To post to this group, send email to [ats-l...@googlegroups.com](mailto:ats-l...@googlegroups.com)  
> \<javascript:\>.  
> Visit this group at [http://groups.google.com/group/ats-lang-users](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/CAPPSPLpH5RkJSax5E7LQ0jmonnSKWp1BiwF\_jr5pRVZT4Eke\_w%40mail.gmail.com](https://groups.google.com/d/msgid/ats-lang-users/CAPPSPLpH5RkJSax5E7LQ0jmonnSKWp1BiwF_jr5pRVZT4Eke_w%40mail.gmail.com)  
> [https://groups.google.com/d/msgid/ats-lang-users/CAPPSPLpH5RkJSax5E7LQ0jmonnSKWp1BiwF\_jr5pRVZT4Eke\_w%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/ats-lang-users/CAPPSPLpH5RkJSax5E7LQ0jmonnSKWp1BiwF_jr5pRVZT4Eke_w%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> .

---

<div class="post-metadata">

**Author:** ![gmhwxi](https://avatars.discourse-cdn.com/v4/letter/g/67e7ee/32.png) [@gmhwxi](https://discourse.ats-lang.org/u/gmhwxi)\
**Post date:** [February 23, 2015, 7:45pm UTC](https://discourse.ats-lang.org/t/tuples-records-in-the-statics/547/5 "2015-02-23T19:45:32Z")

</div>

There is no direct support for tuples in the statics.On Mon, Feb 23, 2015 at 2:19 PM, Shea Levy [sh...@shealevy.com](mailto:sh...@shealevy.com) wrote:

> Hi all,
> 
> I know we have datasorts, but do we have something similar to build up  
> tuples records of sorts? I know I can just use a single-constructor  
> datasort, just wondering if there’s something more direct.
> 
> ~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](mailto:ats-lang-user...@googlegroups.com).  
> To post to this group, send email to [ats-lan...@googlegroups.com](mailto:ats-lan...@googlegroups.com).  
> Visit this group at [http://groups.google.com/group/ats-lang-users](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/B75CEE5A-16BC-472F-B044-5AB8277921EB%40shealevy.com](https://groups.google.com/d/msgid/ats-lang-users/B75CEE5A-16BC-472F-B044-5AB8277921EB%40shealevy.com)  
> .

---

<div class="post-metadata">

**Author:** ![gmhwxi](https://avatars.discourse-cdn.com/v4/letter/g/67e7ee/32.png) [@gmhwxi](https://discourse.ats-lang.org/u/gmhwxi)\
**Post date:** [February 23, 2015, 9:00pm UTC](https://discourse.ats-lang.org/t/tuples-records-in-the-statics/547/6 "2015-02-23T21:00:14Z")

</div>

Could you write some pseudo code?On Mon, Feb 23, 2015 at 3:56 PM, Shea Levy [sh...@shealevy.com](mailto:sh...@shealevy.com) wrote:

> Is there any way to “unpack” datasorts, some kind of scase?
> 
> On Feb 23, 2015, at 2:45 PM, Hongwei Xi [gmh...@gmail.com](mailto:gmh...@gmail.com) wrote:
> 
> There is no direct support for tuples in the statics.
> 
> On Mon, Feb 23, 2015 at 2:19 PM, Shea Levy [sh...@shealevy.com](mailto:sh...@shealevy.com) wrote:
> 
> > Hi all,
> > 
> > I know we have datasorts, but do we have something similar to build up  
> > tuples records of sorts? I know I can just use a single-constructor  
> > datasort, just wondering if there’s something more direct.
> > 
> > ~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](mailto:ats-lang-user...@googlegroups.com).  
> > To post to this group, send email to [ats-lan...@googlegroups.com](mailto:ats-lan...@googlegroups.com).  
> > Visit this group at [http://groups.google.com/group/ats-lang-users](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/B75CEE5A-16BC-472F-B044-5AB8277921EB%40shealevy.com](https://groups.google.com/d/msgid/ats-lang-users/B75CEE5A-16BC-472F-B044-5AB8277921EB%40shealevy.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-user...@googlegroups.com](mailto:ats-lang-user...@googlegroups.com).  
> To post to this group, send email to [ats-lan...@googlegroups.com](mailto:ats-lan...@googlegroups.com).  
> Visit this group at [http://groups.google.com/group/ats-lang-users](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/CAPPSPLoiXvgSx1OKTLo%2B3%3DN\_P0qqHvYaZ06kCEta30o9G-Ldfw%40mail.gmail.com](https://groups.google.com/d/msgid/ats-lang-users/CAPPSPLoiXvgSx1OKTLo%2B3%3DN_P0qqHvYaZ06kCEta30o9G-Ldfw%40mail.gmail.com)  
> [https://groups.google.com/d/msgid/ats-lang-users/CAPPSPLoiXvgSx1OKTLo%2B3%3DN\_P0qqHvYaZ06kCEta30o9G-Ldfw%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/ats-lang-users/CAPPSPLoiXvgSx1OKTLo%2B3%3DN_P0qqHvYaZ06kCEta30o9G-Ldfw%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 [ats-lang-user...@googlegroups.com](mailto:ats-lang-user...@googlegroups.com).  
> To post to this group, send email to [ats-lan...@googlegroups.com](mailto:ats-lan...@googlegroups.com).  
> Visit this group at [http://groups.google.com/group/ats-lang-users](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/A73DD363-CCD5-494C-92FB-BA11268D0486%40shealevy.com](https://groups.google.com/d/msgid/ats-lang-users/A73DD363-CCD5-494C-92FB-BA11268D0486%40shealevy.com)  
> [https://groups.google.com/d/msgid/ats-lang-users/A73DD363-CCD5-494C-92FB-BA11268D0486%40shealevy.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/ats-lang-users/A73DD363-CCD5-494C-92FB-BA11268D0486%40shealevy.com?utm_medium=email&utm_source=footer)  
> .
