# ATS may need a keywords-indexed reference

**URL:** <https://discourse.ats-lang.org/t/ats-may-need-a-keywords-indexed-reference/226>\
**Category:** Google Group\
**Created:** [November 8, 2015, 9:32am UTC](https://discourse.ats-lang.org/t/ats-may-need-a-keywords-indexed-reference/226 "2015-11-08T09:32:49Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![He-chien\_Tsai](https://avatars.discourse-cdn.com/v4/letter/h/dec6dc/32.png) [@He-chien\_Tsai](https://discourse.ats-lang.org/u/He-chien_Tsai)\
**Post date:** [November 8, 2015, 9:32am UTC](https://discourse.ats-lang.org/t/ats-may-need-a-keywords-indexed-reference/226/1 "2015-11-08T09:32:49Z")

</div>

I read all docs hardly and think “Effective ATS Programming through  
Examples” is potentially the most effective way to learn ATS, but It’s  
still hard to find the meaning of uncommon symbols or keywords in current  
documents when examples skip some explainations. After a while, I found  
that a quick overview like Wikipedia’s ATS  
[https://en.wikipedia.org/wiki/ATS\_(programming\_language)#Features](https://en.wikipedia.org/wiki/ATS_%28programming_language%29#Features)  
helps me rookies a lot. There’s many people says ATS is too hard to learn,  
I think it’s because current doc don’t provides an organzed overview and  
reference. Please consider this documenting approach for offical doc.

---

<div class="post-metadata">

**Author:** ![Yannick\_Duchene](https://avatars.discourse-cdn.com/v4/letter/y/b77776/32.png) [@Yannick\_Duchene](https://discourse.ats-lang.org/u/Yannick_Duchene)\
**Post date:** [December 10, 2015, 10:36pm UTC](https://discourse.ats-lang.org/t/ats-may-need-a-keywords-indexed-reference/226/2 "2015-12-10T22:36:20Z")

</div>

Hello,

For predefined sorts and others, you may also look in the source:

> <https://github.com/Hibou57/ATS-Postiats/blob/master/src/pats_staexp2.sats#L242>

Line 242 to line 283

And:

> <https://github.com/Hibou57/ATS-Postiats/blob/master/src/pats_symbol.sats#L96>

Line 96 to line 147/

There are some at other places…Le dimanche 8 novembre 2015 10:32:49 UTC+1, He-chien Tsai a écrit :

> I read all docs hardly and think “Effective ATS Programming through  
> Examples” is potentially the most effective way to learn ATS, but It’s  
> still hard to find the meaning of uncommon symbols or keywords in current  
> documents when examples skip some explainations. After a while, I found  
> that a quick overview like Wikipedia’s ATS  
> [https://en.wikipedia.org/wiki/ATS\_(programming\_language)#Features](https://en.wikipedia.org/wiki/ATS_%28programming_language%29#Features)  
> helps me rookies a lot. There’s many people says ATS is too hard to learn,  
> I think it’s because current doc don’t provides an organzed overview and  
> reference. Please consider this documenting approach for offical doc.

---

<div class="post-metadata">

**Author:** ![Yannick\_Duchene](https://avatars.discourse-cdn.com/v4/letter/y/b77776/32.png) [@Yannick\_Duchene](https://discourse.ats-lang.org/u/Yannick_Duchene)\
**Post date:** [December 11, 2015, 12:55am UTC](https://discourse.ats-lang.org/t/ats-may-need-a-keywords-indexed-reference/226/3 "2015-12-11T00:55:57Z")

</div>

> Additionally, and as I needed it anyway for some personal use, here are  
> lists of lexical units, keywords and other stuffs, taken from two sources.  
> There are duplicates.

And for a fix about these lists: the “(\*” comment start if missing (the  
lexer starts to read a single parenthesis, tha’s why), “abst”, “absvt”, “t”  
and “vt”, are not keywords (the lexer uses these prefix, that’s why they  
were there). Also, I feel some @ vs 0 synonymous are missing.

---

<div class="post-metadata">

**Author:** ![Brandon\_Barker](https://sea1.discourse-cdn.com/flex019/user_avatar/discourse.ats-lang.org/brandon_barker/32/61_2.png) [@Brandon\_Barker](https://discourse.ats-lang.org/u/Brandon_Barker)\
**Post date:** [November 8, 2015, 2:38pm UTC](https://discourse.ats-lang.org/t/ats-may-need-a-keywords-indexed-reference/226/4 "2015-11-08T14:38:20Z")

</div>

And this: [Create new page · githwxi/ATS-Postiats Wiki · GitHub](https://github.com/githwxi/ATS-Postiats/wiki/Built-in-operatorsOn) Sun, Nov 8, 2015 at 9:37 AM, Brandon Barker [brandon...@gmail.com](mailto:brandon...@gmail.com) wrote:

> This is by no means complete, but it is the most comprehensive I now  
> of: [https://github.com/githwxi/ATS-Postiats/wiki/keywords](https://github.com/githwxi/ATS-Postiats/wiki/keywords)
> 
> On Sun, Nov 8, 2015 at 4:32 AM, He-chien Tsai [depo...@gmail.com](mailto:depo...@gmail.com) wrote:
> 
> > I read all docs hardly and think “Effective ATS Programming through  
> > Examples” is potentially the most effective way to learn ATS, but It’s still  
> > hard to find the meaning of uncommon symbols or keywords in current  
> > documents when examples skip some explainations. After a while, I found that  
> > a quick overview like Wikipedia’s ATS helps me rookies a lot. There’s many  
> > people says ATS is too hard to learn, I think it’s because current doc don’t  
> > provides an organzed overview and reference. Please consider this  
> > documenting approach for offical doc.
> > 
> > –  
> > 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/48b61642-6797-48ba-a947-4751c5aebcfd%40googlegroups.com](https://groups.google.com/d/msgid/ats-lang-users/48b61642-6797-48ba-a947-4751c5aebcfd%40googlegroups.com).
> 
> –  
> Brandon Barker  
> [brandon...@gmail.com](mailto:brandon...@gmail.com)

Brandon Barker  
[brandon...@gmail.com](mailto:brandon...@gmail.com)

---

<div class="post-metadata">

**Author:** ![Yannick\_Duchene](https://avatars.discourse-cdn.com/v4/letter/y/b77776/32.png) [@Yannick\_Duchene](https://discourse.ats-lang.org/u/Yannick_Duchene)\
**Post date:** [December 11, 2015, 12:46am UTC](https://discourse.ats-lang.org/t/ats-may-need-a-keywords-indexed-reference/226/5 "2015-12-11T00:46:24Z")

</div>

> Hello,
> 
> For predefined sorts and others, you may also look in the source:
> 
> [https://github.com/Hibou57/ATS-Postiats/blob/master/src/pats\_staexp2.sats#L242](https://github.com/Hibou57/ATS-Postiats/blob/master/src/pats_staexp2.sats#L242)  
> Line 242 to line 283
> 
> And:
> 
> [https://github.com/Hibou57/ATS-Postiats/blob/master/src/pats\_symbol.sats#L96](https://github.com/Hibou57/ATS-Postiats/blob/master/src/pats_symbol.sats#L96)  
> Line 96 to line 147/
> 
> There are some at other places…

Additionally, and as I needed it anyway for some personal use, here are  
lists of lexical units, keywords and other stuffs, taken from two sources.  
There are duplicates.

From pats\_lexing.dats

Comment starts:  
/\*  
//  
////

Keywords:  
abst  
abst@ype  
absviewt  
absviewt@ype  
absvt  
absvt@ype  
addr  
addr@  
case  
case+  
case-  
fix  
fix@  
fold  
fold@  
for  
for\*  
free  
free@  
lam  
lam@  
llam  
llam@  
prop  
prop+  
prop-  
ref  
ref@  
t  
t0ype (= t@ype)  
t0ype+  
t0ype-  
t@ype  
t@ype (= t0ype)  
type  
type+  
type-  
val  
val+  
val-  
view  
view+  
view-  
view@  
viewt  
viewt0ype (= viewt@ype)  
viewt0ype+  
viewt0ype-  
viewt@ype  
viewt@ype (= viewt0ype)  
viewtype  
viewtype+  
viewtype-  
vt  
vt0ype (= vt@ype)  
vt0ype+  
vt0ype-  
vt@ype  
vt@ype (= vt0ype)  
vtype  
vtype+  
vtype-  
while  
while\*

From pats\_lexing.sats

Keywords:  
absview  
absviewt@ype  
absviewtype  
addr@  
and  
as  
assume  
begin  
case  
case+  
case-  
classdec  
dataprop  
datasort  
datatype  
dataview  
dataviewtype  
do  
dynload  
else  
end  
exception  
extern  
fix  
fix@  
fn  
fnx  
fold@  
for  
for\*  
free@  
fun  
if  
implement  
implmnt  
import  
in  
infix  
infixl  
infixr  
lam  
lam@  
let  
llam  
local  
macdef  
macrodef  
nonfix  
of  
op  
overload  
postfix  
prcase  
prefix  
prfn  
prfun  
primplmnt  
propdef  
prval  
prvar  
rec  
ref@  
scase  
sif for static if  
sortdef  
stacst  
stadef  
staload  
static  
symelim  
symintr  
then  
tkindef  
try  
type  
type+  
type-  
typedef  
val  
val+  
val-  
var  
view@  
viewdef  
viewtypedef  
when  
where  
while  
while\*  
with

Keywords from DML, now rarely used:  
withtype  
withprop  
withview  
withviewtype

Suspended keywords:  
stavar

Function effects tags (not real keywords):  
ntm  
exn  
ref  
wrt  
all

Preprocessor-like (not keywords and invalid as identifiers):  
#assert  
#codegen2  
#codegen3  
#define  
#elif  
#elifdef  
#elifndef  
#else  
#endif  
#error  
#if  
#ifdef  
#ifndef  
#include  
#print  
#require  
#then  
#undef

Special functions/values (not keywords and invalid as identifiers):  
$  
$arrpsz  
$arrptrsize  
$break  
$continue  
$d2ctype  
$delay  
$effmask  
$extern  
$extkind  
$ldelay  
$literal  
$lst  
$lst\_t  
$lst\_vt  
$myfilename  
$myfunction  
$mylocation  
$raise  
$rec  
$rec\_t  
$rec\_vt  
$showtype  
$solver\_assert  
$solver\_verify  
$tempenver  
$tup  
$tup\_t  
$tup\_vt  
$vcopyenv\_v  
$vcopyenv\_vt

Punctuation-like:  
{  
|  
}  
!  
#[  
%(  
'(  
'[  
'{  
(  
)  
,  
,(  
-\<  
-\<\>  
 →   
.  
…  
…  
.\<  
.\<\>.  
:  
:\<  
;  
\<  
\<\>  
=/=\>  
=/=\>\>  
=\<  
=\<\>  
=\>  
=\>\>  
\>  
\>.  
@  
@(  
@[  
@{  
[  
  
]  
` `(

Special (a dot followed by a decimal integer):  
.[0-9]+

Others (lexical):  
alnum  
symbol  
A[…]  
A\<…\>  
$alnum  
#alnum  
character  
float  
cdata  
string  
line comment  
block comment  
rest-of-file comment  
errors  
end-of-file

---

<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:** [November 8, 2015, 10:09pm UTC](https://discourse.ats-lang.org/t/ats-may-need-a-keywords-indexed-reference/226/6 "2015-11-08T22:09:47Z")

</div>

For now, the two books on programming in ATS have one-chunk version:

[http://ats-lang.sourceforge.net/DOCUMENT/ATS2TUTORIAL/HTML/ATS2TUTORIAL-BOOK-onechunk.html](http://ats-lang.sourceforge.net/DOCUMENT/ATS2TUTORIAL/HTML/ATS2TUTORIAL-BOOK-onechunk.html)  
[http://ats-lang.sourceforge.net/DOCUMENT/INT2PROGINATS/HTML/INT2PROGINATS-BOOK-onechunk.html](http://ats-lang.sourceforge.net/DOCUMENT/INT2PROGINATS/HTML/INT2PROGINATS-BOOK-onechunk.html)

which you can use to search for keywords.On Sunday, November 8, 2015 at 4:32:49 AM UTC-5, He-chien Tsai wrote:

> I read all docs hardly and think “Effective ATS Programming through  
> Examples” is potentially the most effective way to learn ATS, but It’s  
> still hard to find the meaning of uncommon symbols or keywords in current  
> documents when examples skip some explainations. After a while, I found  
> that a quick overview like Wikipedia’s ATS  
> [https://en.wikipedia.org/wiki/ATS\_(programming\_language)#Features](https://en.wikipedia.org/wiki/ATS_%28programming_language%29#Features)  
> helps me rookies a lot. There’s many people says ATS is too hard to learn,  
> I think it’s because current doc don’t provides an organzed overview and  
> reference. Please consider this documenting approach for offical doc.

---

<div class="post-metadata">

**Author:** ![Brandon\_Barker](https://sea1.discourse-cdn.com/flex019/user_avatar/discourse.ats-lang.org/brandon_barker/32/61_2.png) [@Brandon\_Barker](https://discourse.ats-lang.org/u/Brandon_Barker)\
**Post date:** [November 8, 2015, 2:37pm UTC](https://discourse.ats-lang.org/t/ats-may-need-a-keywords-indexed-reference/226/7 "2015-11-08T14:37:48Z")

</div>

This is by no means complete, but it is the most comprehensive I now  
of: [Create new page · githwxi/ATS-Postiats Wiki · GitHub](https://github.com/githwxi/ATS-Postiats/wiki/keywordsOn) Sun, Nov 8, 2015 at 4:32 AM, He-chien Tsai [depo...@gmail.com](mailto:depo...@gmail.com) wrote:

> I read all docs hardly and think “Effective ATS Programming through  
> Examples” is potentially the most effective way to learn ATS, but It’s still  
> hard to find the meaning of uncommon symbols or keywords in current  
> documents when examples skip some explainations. After a while, I found that  
> a quick overview like Wikipedia’s ATS helps me rookies a lot. There’s many  
> people says ATS is too hard to learn, I think it’s because current doc don’t  
> provides an organzed overview and reference. Please consider this  
> documenting approach for offical doc.
> 
> –  
> 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/48b61642-6797-48ba-a947-4751c5aebcfd%40googlegroups.com](https://groups.google.com/d/msgid/ats-lang-users/48b61642-6797-48ba-a947-4751c5aebcfd%40googlegroups.com).

Brandon Barker  
[brandon...@gmail.com](mailto:brandon...@gmail.com)
