atscc doesn't compile hello world

40 views
Skip to first unread message

Temirkhan Myrzamadi

unread,
Feb 26, 2020, 11:40:17 AM2/26/20
to ats-lang-users
I've installed ATS by typing the following commands:

```
sudo apt install ats2-lang
sudo apt install ats-lang-anairiats
```

My learn.dats file:

```
implement
main0 () = print("Hello, world!\n")
```

But atscc cannot compile it:

```
$ atscc -o hello learn.dats
/usr/lib/ats-anairiats-0.2.11/bin/atsopt --output learn_dats.c --dynamic learn.dats
/home/hirrolot/learn.dats: 13(line=4, offs=1) -- 48(line=4, offs=36): error(2): the dynamic identifier [main0] is unrecognized.
exit(ATS): uncaught exception: ATS_2d0_2e2_2e11_2src_2ats_error_2esats__FatalErrorException(1027)
```

The atscc version:

```
$ atscc --version
ATS/Anairiats version 0.2.11 with Copyright (c) 2002-2013 Hongwei Xi
gcc -I/usr/lib/ats-anairiats-0.2.11/ -I/usr/lib/ats-anairiats-0.2.11/ccomp/runtime/ -L/usr/lib/ats-anairiats-0.2.11/ccomp/lib64/ /usr/lib/ats-anairiats-0.2.11/ccomp/runtime/ats_prelude.c --version -lats
gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
```

My OS:

```
                                       hirrolot@hirrolot-desktop
 MMMMMMMMMMMMMMMMMMMMMMMMMmds+.        OS: Mint 19.1 tessa
 MMm----::-://////////////oymNMd+`     Kernel: x86_64 Linux 4.15.0-20-generic
 MMd      /++                -sNMd:    Uptime: 5h 42m
 MMNso/`  dMM    `.::-. .-::.` .hMN:   Packages: 2194
 ddddMMh  dMM   :hNMNMNhNMNMNh: `NMm   Shell: bash 4.4.20
     NMm  dMM  .NMN/-+MMM+-/NMN` dMM   Resolution: 2560x1440
     NMm  dMM  -MMm  `MMM   dMM. dMM   DE: Cinnamon 4.0.10
     NMm  dMM  -MMm  `MMM   dMM. dMM   WM: Muffin
     NMm  dMM  .mmd  `mmm   yMM. dMM   WM Theme: Mint-Y-Dark (Mint-Y)
     NMm  dMM`  ..`   ...   ydm. dMM   GTK Theme: Mint-Y [GTK2/3]
     hMM- +MMd/-------...-:sdds  dMM   Icon Theme: Mint-Y
     -NMm- :hNMNNNmdddddddddy/`  dMM   Font: Noto Sans 9
      -dMNs-``-::::-------.``    dMM   CPU: Intel Core i7-6700 @ 8x 4GHz [44.0°C]
       `/dMNmy+/:-------------:/yMMM   GPU: NV136
          ./ydNMMMMMMMMMMMMMMMMMMMMM   RAM: 3086MiB / 7927MiB
             \.MMMMMMMMMMMMMMMMMMM   
                                     
```

I guess that I have an old version of ATS. How can I fix it?

Artyom Shalkhakov

unread,
Feb 26, 2020, 11:43:04 AM2/26/20
to ats-lang-users
Hi Temirkhan,

Please use "patscc" instead of "atscc".

ср, 26 февр. 2020 г. в 18:40, Temirkhan Myrzamadi <hirr...@gmail.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.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/b84b962a-1ba5-448b-8150-076dfcd987b0%40googlegroups.com.


--
Cheers,
Artyom Shalkhakov

Temirkhan Myrzamadi

unread,
Feb 26, 2020, 11:44:36 AM2/26/20
to ats-lang-users
This helped, thank you!
To unsubscribe from this group and stop receiving emails from it, send an email to ats-lan...@googlegroups.com.


--
Cheers,
Artyom Shalkhakov

Hongwei Xi

unread,
Feb 26, 2020, 12:40:47 PM2/26/20
to ats-lan...@googlegroups.com
I see. You must have installed via the apt tool or something similar.

You can find how to install ATS on www.ats-lang.org

By the way, I think that you can make your program working if you write

implement main() = (print "Hello, world!\n"; 0)

Anyway, please install ATS2 (ATS-Postiats). What you have is ATS1, which is for
people developing/maintaining ATS2.


--
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.
Reply all
Reply to author
Forward
0 new messages