# Not such a great first experience malheureusement

**URL:** <https://discourse.ats-lang.org/t/not-such-a-great-first-experience-malheureusement/267>\
**Category:** Google Group\
**Created:** [July 16, 2014, 5:52pm UTC](https://discourse.ats-lang.org/t/not-such-a-great-first-experience-malheureusement/267 "2014-07-16T17:52:41Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raoul\_Duke](https://avatars.discourse-cdn.com/v4/letter/r/bbe5ce/32.png) [@Raoul\_Duke](https://discourse.ats-lang.org/u/Raoul_Duke)\
**Post date:** [July 16, 2014, 5:52pm UTC](https://discourse.ats-lang.org/t/not-such-a-great-first-experience-malheureusement/267/1 "2014-07-16T17:52:41Z")

</div>

hi,

i used brew to install ats-2 on a mac.

- i tried the most basic, i think, hello world example.

- it spits out a lot of stuff that i didn’t ask for; if things are  
working, don’t bother telling me, and don’t use “!” as if it is a  
miracle that it worked. it sure makes it hard to see where any _real_  
problems are.

- it gives me errors. they are obtuse to first time users. what do i  
need to change to make this work?

thanks for any help. (version at the bottom)

ATS 533 $ cat test.dats

implement main() = print(“Hello World\n”);

ATS 534 $ patscc test.dats

exec(patsopt --output test\_dats.c --dynamic test.dats)

Hello from ATS2(ATS/Postiats)!

Loading [fixity.ats] starts!

Loading [fixity.ats] finishes!

Loading [basics\_pre.sats] starts!

Loading [basics\_pre.sats] finishes!

Loading [basics\_sta.sats] starts!

Loading [basics\_sta.sats] finishes!

Loading [basics\_dyn.sats] starts!

Loading [basics\_dyn.sats] finishes!

Loading [basics\_gen.sats] starts!

Loading [basics\_gen.sats] finishes!

The 1st translation (fixity) of [test.dats] is successfully completed!

The 2nd translation (binding) of [test.dats] is successfully completed!

/Users/x/Downloads/tmp/ATS/test.dats: 20(line=1, offs=20) –  
41(line=1, offs=41): error(3):  
[/home/hwxi/research/Postiats/git/src/pats\_trans3\_util.dats]:  
d3exp\_trdn: the dynamic expression cannot be assigned the type  
[S2Eapp(S2Ecst(g0int\_t0ype); S2Ecst(int\_kind))].

/Users/x/Downloads/tmp/ATS/test.dats: 20(line=1, offs=20) –  
41(line=1, offs=41): error(3): mismatch of static terms (tyleq):

The actual term is: S2Ecst(atsvoid\_t0ype)

The needed term is: S2Eapp(S2Ecst(g0int\_t0ype); S2Ecst(int\_kind))

TRANS3: there are [1] errors in total.

exit(ATS): uncaught exception:  
\_2home\_2hwxi\_2research\_2Postiats\_2git\_2src\_2pats\_error\_2esats\_\_FatalErrorException(1025)

exec(patsopt --output test\_dats.c --dynamic test.dats) = 256

ATS 540 $ patscc -v

exec(gcc -std=c99 -D\_XOPEN\_SOURCE -I${PATSHOME}  
-I${PATSHOME}/ccomp/runtime -L${PATSHOME}/ccomp/atslib/lib  
-L${PATSHOME}/ccomp/atslib/lib64 -v)

Using built-in specs.

Target: i686-apple-darwin11

Configured with:  
/private/var/tmp/llvmgcc42/llvmgcc42-2335.15~25/src/configure  
–disable-checking --enable-werror  
–prefix=/Developer/usr/llvm-gcc-4.2 --mandir=/share/man  
–enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm-  
–program-transform-name=/^[cg][^.-]\*$/s/$/-4.2/  
–with-slibdir=/usr/lib --build=i686-apple-darwin11  
–enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2335.15~25/dst-llvmCore/Developer/usr/local  
–program-prefix=i686-apple-darwin11- --host=x86\_64-apple-darwin11  
–target=i686-apple-darwin11  
–with-gxx-include-dir=/usr/include/c++/4.2.1

Thread model: posix

gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)

exec(gcc -std=c99 -D\_XOPEN\_SOURCE -I${PATSHOME}  
-I${PATSHOME}/ccomp/runtime -L${PATSHOME}/ccomp/atslib/lib  
-L${PATSHOME}/ccomp/atslib/lib64 -v) = 0

---

<div class="post-metadata">

**Author:** ![Raoul\_Duke](https://avatars.discourse-cdn.com/v4/letter/r/bbe5ce/32.png) [@Raoul\_Duke](https://discourse.ats-lang.org/u/Raoul_Duke)\
**Post date:** [July 16, 2014, 6:01pm UTC](https://discourse.ats-lang.org/t/not-such-a-great-first-experience-malheureusement/267/2 "2014-07-16T18:01:56Z")

</div>

that worked, thanks!

(although it is hard to see that the compiler report is any different  
than when it failed. all the extraneous compiler output hides the  
actually important stuff, i think.)

i suspect some (more than one) online tutorials need to be updated? :-}  
e.g. [http://www.ats-lang.org/EXAMPLE/On](http://www.ats-lang.org/EXAMPLE/On) Wed, Jul 16, 2014 at 10:57 AM, gmhwxi [gmh...@gmail.com](mailto:gmh...@gmail.com) wrote:

> The function ‘main’ should be changed to ‘main0’:
> 
> implement main0 () = print(“Hello World\n”)
> 
> fun main: () → int  
> fun main0: () → void
> 
> On Wednesday, July 16, 2014 1:53:27 PM UTC-4, Raoul Duke wrote:
> 
> > hi,
> > 
> > i used brew to install ats-2 on a mac.
> > 
> > - i tried the most basic, i think, hello world example.
> > 
> > - it spits out a lot of stuff that i didn’t ask for; if things are  
> > working, don’t bother telling me, and don’t use “!” as if it is a  
> > miracle that it worked. it sure makes it hard to see where any _real_  
> > problems are.
> > 
> > - it gives me errors. they are obtuse to first time users. what do i  
> > need to change to make this work?
> > 
> > thanks for any help. (version at the bottom)
> > 
> > ATS 533 $ cat test.dats
> > 
> > implement main() = print(“Hello World\n”);
> > 
> > ATS 534 $ patscc test.dats
> > 
> > exec(patsopt --output test\_dats.c --dynamic test.dats)
> > 
> > Hello from ATS2(ATS/Postiats)!
> > 
> > Loading [fixity.ats] starts!
> > 
> > Loading [fixity.ats] finishes!
> > 
> > Loading [basics\_pre.sats] starts!
> > 
> > Loading [basics\_pre.sats] finishes!
> > 
> > Loading [basics\_sta.sats] starts!
> > 
> > Loading [basics\_sta.sats] finishes!
> > 
> > Loading [basics\_dyn.sats] starts!
> > 
> > Loading [basics\_dyn.sats] finishes!
> > 
> > Loading [basics\_gen.sats] starts!
> > 
> > Loading [basics\_gen.sats] finishes!
> > 
> > The 1st translation (fixity) of [test.dats] is successfully completed!
> > 
> > The 2nd translation (binding) of [test.dats] is successfully completed!
> > 
> > /Users/x/Downloads/tmp/ATS/test.dats: 20(line=1, offs=20) –  
> > 41(line=1, offs=41): error(3):  
> > [/home/hwxi/research/Postiats/git/src/pats\_trans3\_util.dats]:  
> > d3exp\_trdn: the dynamic expression cannot be assigned the type  
> > [S2Eapp(S2Ecst(g0int\_t0ype); S2Ecst(int\_kind))].
> > 
> > /Users/x/Downloads/tmp/ATS/test.dats: 20(line=1, offs=20) –  
> > 41(line=1, offs=41): error(3): mismatch of static terms (tyleq):
> > 
> > The actual term is: S2Ecst(atsvoid\_t0ype)
> > 
> > The needed term is: S2Eapp(S2Ecst(g0int\_t0ype); S2Ecst(int\_kind))
> > 
> > TRANS3: there are [1] errors in total.
> > 
> > exit(ATS): uncaught exception:
> > 
> > \_2home\_2hwxi\_2research\_2Postiats\_2git\_2src\_2pats\_error\_2esats\_\_FatalErrorException(1025)
> > 
> > exec(patsopt --output test\_dats.c --dynamic test.dats) = 256
> > 
> > ATS 540 $ patscc -v
> > 
> > exec(gcc -std=c99 -D\_XOPEN\_SOURCE -I${PATSHOME}  
> > -I${PATSHOME}/ccomp/runtime -L${PATSHOME}/ccomp/atslib/lib  
> > -L${PATSHOME}/ccomp/atslib/lib64 -v)
> > 
> > Using built-in specs.
> > 
> > Target: i686-apple-darwin11
> > 
> > Configured with:  
> > /private/var/tmp/llvmgcc42/llvmgcc42-2335.15~25/src/configure  
> > –disable-checking --enable-werror  
> > –prefix=/Developer/usr/llvm-gcc-4.2 --mandir=/share/man  
> > –enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm-  
> > –program-transform-name=/\[1\][^.-]\*$/s/$/-4.2/  
> > –with-slibdir=/usr/lib --build=i686-apple-darwin11
> > 
> > –enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2335.15~25/dst-llvmCore/Developer/usr/local  
> > –program-prefix=i686-apple-darwin11- --host=x86\_64-apple-darwin11  
> > –target=i686-apple-darwin11  
> > –with-gxx-include-dir=/usr/include/c++/4.2.1
> > 
> > Thread model: posix
> > 
> > gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)
> > 
> > exec(gcc -std=c99 -D\_XOPEN\_SOURCE -I${PATSHOME}  
> > -I${PATSHOME}/ccomp/runtime -L${PATSHOME}/ccomp/atslib/lib  
> > -L${PATSHOME}/ccomp/atslib/lib64 -v) = 0
> 
> –  
> 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/48159aed-d0de-4405-b1bc-ad0fdffaf3fe%40googlegroups.com](https://groups.google.com/d/msgid/ats-lang-users/48159aed-d0de-4405-b1bc-ad0fdffaf3fe%40googlegroups.com).

* * *

1. cg

---

<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:** [July 16, 2014, 5:57pm UTC](https://discourse.ats-lang.org/t/not-such-a-great-first-experience-malheureusement/267/3 "2014-07-16T17:57:57Z")

</div>

The function ‘main’ should be changed to ‘main0’:

implement main0 () = print(“Hello World\n”)

fun main: () → int  
fun main0: () → voidOn Wednesday, July 16, 2014 1:53:27 PM UTC-4, Raoul Duke wrote:

> hi,
> 
> i used brew to install ats-2 on a mac.
> 
> - i tried the most basic, i think, hello world example.
> 
> - it spits out a lot of stuff that i didn’t ask for; if things are  
> working, don’t bother telling me, and don’t use “!” as if it is a  
> miracle that it worked. it sure makes it hard to see where any _real_  
> problems are.
> 
> - it gives me errors. they are obtuse to first time users. what do i  
> need to change to make this work?
> 
> thanks for any help. (version at the bottom)
> 
> ATS 533 $ cat test.dats
> 
> implement main() = print(“Hello World\n”);
> 
> ATS 534 $ patscc test.dats
> 
> exec(patsopt --output test\_dats.c --dynamic test.dats)
> 
> Hello from ATS2(ATS/Postiats)!
> 
> Loading [fixity.ats] starts!
> 
> Loading [fixity.ats] finishes!
> 
> Loading [basics\_pre.sats] starts!
> 
> Loading [basics\_pre.sats] finishes!
> 
> Loading [basics\_sta.sats] starts!
> 
> Loading [basics\_sta.sats] finishes!
> 
> Loading [basics\_dyn.sats] starts!
> 
> Loading [basics\_dyn.sats] finishes!
> 
> Loading [basics\_gen.sats] starts!
> 
> Loading [basics\_gen.sats] finishes!
> 
> The 1st translation (fixity) of [test.dats] is successfully completed!
> 
> The 2nd translation (binding) of [test.dats] is successfully completed!
> 
> /Users/x/Downloads/tmp/ATS/test.dats: 20(line=1, offs=20) –  
> 41(line=1, offs=41): error(3):  
> [/home/hwxi/research/Postiats/git/src/pats\_trans3\_util.dats]:  
> d3exp\_trdn: the dynamic expression cannot be assigned the type  
> [S2Eapp(S2Ecst(g0int\_t0ype); S2Ecst(int\_kind))].
> 
> /Users/x/Downloads/tmp/ATS/test.dats: 20(line=1, offs=20) –  
> 41(line=1, offs=41): error(3): mismatch of static terms (tyleq):
> 
> The actual term is: S2Ecst(atsvoid\_t0ype)
> 
> The needed term is: S2Eapp(S2Ecst(g0int\_t0ype); S2Ecst(int\_kind))
> 
> TRANS3: there are [1] errors in total.
> 
> exit(ATS): uncaught exception:  
> \_2home\_2hwxi\_2research\_2Postiats\_2git\_2src\_2pats\_error\_2esats\_\_FatalErrorException(1025)
> 
> exec(patsopt --output test\_dats.c --dynamic test.dats) = 256
> 
> ATS 540 $ patscc -v
> 
> exec(gcc -std=c99 -D\_XOPEN\_SOURCE -I${PATSHOME}  
> -I${PATSHOME}/ccomp/runtime -L${PATSHOME}/ccomp/atslib/lib  
> -L${PATSHOME}/ccomp/atslib/lib64 -v)
> 
> Using built-in specs.
> 
> Target: i686-apple-darwin11
> 
> Configured with:  
> /private/var/tmp/llvmgcc42/llvmgcc42-2335.15~25/src/configure  
> –disable-checking --enable-werror  
> –prefix=/Developer/usr/llvm-gcc-4.2 --mandir=/share/man  
> –enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm-  
> –program-transform-name=/\[1\][^.-]\*$/s/$/-4.2/  
> –with-slibdir=/usr/lib --build=i686-apple-darwin11  
> –enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2335.15~25/dst-llvmCore/Developer/usr/local
> 
> –program-prefix=i686-apple-darwin11- --host=x86\_64-apple-darwin11  
> –target=i686-apple-darwin11  
> –with-gxx-include-dir=/usr/include/c++/4.2.1
> 
> Thread model: posix
> 
> gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)
> 
> exec(gcc -std=c99 -D\_XOPEN\_SOURCE -I${PATSHOME}  
> -I${PATSHOME}/ccomp/runtime -L${PATSHOME}/ccomp/atslib/lib  
> -L${PATSHOME}/ccomp/atslib/lib64 -v) = 0

* * *

1. cg

---

<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:** [July 16, 2014, 6:41pm UTC](https://discourse.ats-lang.org/t/not-such-a-great-first-experience-malheureusement/267/4 "2014-07-16T18:41:29Z")

</div>

If you use emacs+ats2-mode, then the bottom bar tells  
you whether there is any type-error during type-checking.

(Compilation:exit [0]) means no type-error

(Compilation:exit [xxx]) means some type-errorsOn Wednesday, July 16, 2014 2:24:00 PM UTC-4, Raoul Duke wrote:

> > > > (although it is hard to see that the compiler report is any different  
> > > > than when it failed. all the extraneous compiler output hides the  
> > > > actually important stuff, i think.)
> > 
> > Usually the first error is the most informative one.
> 
> the point is that it is hard to see if there _are_ any errors are not.  
> needle in the haystack of output from the compiler.

---

<div class="post-metadata">

**Author:** ![Raoul\_Duke](https://avatars.discourse-cdn.com/v4/letter/r/bbe5ce/32.png) [@Raoul\_Duke](https://discourse.ats-lang.org/u/Raoul_Duke)\
**Post date:** [July 16, 2014, 6:44pm UTC](https://discourse.ats-lang.org/t/not-such-a-great-first-experience-malheureusement/267/5 "2014-07-16T18:44:04Z")

</div>

> If you use emacs+ats2-mode, then the bottom bar tells  
> you whether there is any type-error during type-checking.  
> (Compilation:exit [0]) means no type-error  
> (Compilation:exit [xxx]) means some type-errors

if i have the time Some Day i’ll send a pull request for a mode that  
turns off all the noisy compiler output 🙂

---

<div class="post-metadata">

**Author:** ![Raoul\_Duke](https://avatars.discourse-cdn.com/v4/letter/r/bbe5ce/32.png) [@Raoul\_Duke](https://discourse.ats-lang.org/u/Raoul_Duke)\
**Post date:** [July 16, 2014, 6:23pm UTC](https://discourse.ats-lang.org/t/not-such-a-great-first-experience-malheureusement/267/6 "2014-07-16T18:23:40Z")

</div>

> > > (although it is hard to see that the compiler report is any different  
> > > than when it failed. all the extraneous compiler output hides the  
> > > actually important stuff, i think.)
> 
> Usually the first error is the most informative one.

the point is that it is hard to see if there _are_ any errors are not.  
needle in the haystack of output from the compiler.

---

<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:** [July 16, 2014, 7:04pm UTC](https://discourse.ats-lang.org/t/not-such-a-great-first-experience-malheureusement/267/7 "2014-07-16T19:04:33Z")

</div>

Okay, I cleaned it up a bit. The change should go into the  
next release.On Wednesday, July 16, 2014 2:44:25 PM UTC-4, Raoul Duke wrote:

> > If you use emacs+ats2-mode, then the bottom bar tells  
> > you whether there is any type-error during type-checking.  
> > (Compilation:exit [0]) means no type-error  
> > (Compilation:exit [xxx]) means some type-errors
> 
> if i have the time Some Day i’ll send a pull request for a mode that  
> turns off all the noisy compiler output 🙂

---

<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:** [July 16, 2014, 6:21pm UTC](https://discourse.ats-lang.org/t/not-such-a-great-first-experience-malheureusement/267/8 "2014-07-16T18:21:51Z")

</div>

> > (although it is hard to see that the compiler report is any different  
> > than when it failed. all the extraneous compiler output hides the  
> > actually important stuff, i think.)

Usually the first error is the most informative one.

> > i suspect some (more than one) online tutorials need to be updated? :-}  
> > e.g. [http://www.ats-lang.org/EXAMPLE/](http://www.ats-lang.org/EXAMPLE/)

Fixed.On Wednesday, July 16, 2014 2:06:12 PM UTC-4, Raoul Duke wrote:

> that worked, thanks!
> 
> (although it is hard to see that the compiler report is any different  
> than when it failed. all the extraneous compiler output hides the  
> actually important stuff, i think.)
> 
> i suspect some (more than one) online tutorials need to be updated? :-}  
> e.g. [http://www.ats-lang.org/EXAMPLE/](http://www.ats-lang.org/EXAMPLE/)
> 
> On Wed, Jul 16, 2014 at 10:57 AM, gmhwxi \<[gmh...@gmail.com](mailto:gmh...@gmail.com) \<javascript:\>\> wrote:
> 
> > The function ‘main’ should be changed to ‘main0’:
> > 
> > implement main0 () = print(“Hello World\n”)
> > 
> > fun main: () → int  
> > fun main0: () → void
> > 
> > On Wednesday, July 16, 2014 1:53:27 PM UTC-4, Raoul Duke wrote:
> > 
> > > hi,
> > > 
> > > i used brew to install ats-2 on a mac.
> > > 
> > > - i tried the most basic, i think, hello world example.
> > > 
> > > - it spits out a lot of stuff that i didn’t ask for; if things are  
> > > working, don’t bother telling me, and don’t use “!” as if it is a  
> > > miracle that it worked. it sure makes it hard to see where any _real_  
> > > problems are.
> > > 
> > > - it gives me errors. they are obtuse to first time users. what do i  
> > > need to change to make this work?
> > > 
> > > thanks for any help. (version at the bottom)
> > > 
> > > ATS 533 $ cat test.dats
> > > 
> > > implement main() = print(“Hello World\n”);
> > > 
> > > ATS 534 $ patscc test.dats
> > > 
> > > exec(patsopt --output test\_dats.c --dynamic test.dats)
> > > 
> > > Hello from ATS2(ATS/Postiats)!
> > > 
> > > Loading [fixity.ats] starts!
> > > 
> > > Loading [fixity.ats] finishes!
> > > 
> > > Loading [basics\_pre.sats] starts!
> > > 
> > > Loading [basics\_pre.sats] finishes!
> > > 
> > > Loading [basics\_sta.sats] starts!
> > > 
> > > Loading [basics\_sta.sats] finishes!
> > > 
> > > Loading [basics\_dyn.sats] starts!
> > > 
> > > Loading [basics\_dyn.sats] finishes!
> > > 
> > > Loading [basics\_gen.sats] starts!
> > > 
> > > Loading [basics\_gen.sats] finishes!
> > > 
> > > The 1st translation (fixity) of [test.dats] is successfully completed!
> > > 
> > > The 2nd translation (binding) of [test.dats] is successfully completed!
> > > 
> > > /Users/x/Downloads/tmp/ATS/test.dats: 20(line=1, offs=20) –  
> > > 41(line=1, offs=41): error(3):  
> > > [/home/hwxi/research/Postiats/git/src/pats\_trans3\_util.dats]:  
> > > d3exp\_trdn: the dynamic expression cannot be assigned the type  
> > > [S2Eapp(S2Ecst(g0int\_t0ype); S2Ecst(int\_kind))].
> > > 
> > > /Users/x/Downloads/tmp/ATS/test.dats: 20(line=1, offs=20) –  
> > > 41(line=1, offs=41): error(3): mismatch of static terms (tyleq):
> > > 
> > > The actual term is: S2Ecst(atsvoid\_t0ype)
> > > 
> > > The needed term is: S2Eapp(S2Ecst(g0int\_t0ype); S2Ecst(int\_kind))
> > > 
> > > TRANS3: there are [1] errors in total.
> > > 
> > > exit(ATS): uncaught exception:
> 
> \_2home\_2hwxi\_2research\_2Postiats\_2git\_2src\_2pats\_error\_2esats\_\_FatalErrorException(1025)
> 
> > > exec(patsopt --output test\_dats.c --dynamic test.dats) = 256
> > > 
> > > ATS 540 $ patscc -v
> > > 
> > > exec(gcc -std=c99 -D\_XOPEN\_SOURCE -I${PATSHOME}  
> > > -I${PATSHOME}/ccomp/runtime -L${PATSHOME}/ccomp/atslib/lib  
> > > -L${PATSHOME}/ccomp/atslib/lib64 -v)
> > > 
> > > Using built-in specs.
> > > 
> > > Target: i686-apple-darwin11
> > > 
> > > Configured with:  
> > > /private/var/tmp/llvmgcc42/llvmgcc42-2335.15~25/src/configure  
> > > –disable-checking --enable-werror  
> > > –prefix=/Developer/usr/llvm-gcc-4.2 --mandir=/share/man  
> > > –enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm-  
> > > –program-transform-name=/\[1\][^.-]\*$/s/$/-4.2/  
> > > –with-slibdir=/usr/lib --build=i686-apple-darwin11
> 
> –enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2335.15~25/dst-llvmCore/Developer/usr/local
> 
> > > –program-prefix=i686-apple-darwin11- --host=x86\_64-apple-darwin11  
> > > –target=i686-apple-darwin11  
> > > –with-gxx-include-dir=/usr/include/c++/4.2.1
> > > 
> > > Thread model: posix
> > > 
> > > gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build  
> > > 2335.15.00)
> > > 
> > > exec(gcc -std=c99 -D\_XOPEN\_SOURCE -I${PATSHOME}  
> > > -I${PATSHOME}/ccomp/runtime -L${PATSHOME}/ccomp/atslib/lib  
> > > -L${PATSHOME}/ccomp/atslib/lib64 -v) = 0
> > 
> > –  
> > 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/48159aed-d0de-4405-b1bc-ad0fdffaf3fe%40googlegroups.com](https://groups.google.com/d/msgid/ats-lang-users/48159aed-d0de-4405-b1bc-ad0fdffaf3fe%40googlegroups.com).

* * *

1. cg

---

<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:** [July 16, 2014, 5:58pm UTC](https://discourse.ats-lang.org/t/not-such-a-great-first-experience-malheureusement/267/9 "2014-07-16T17:58:05Z")

</div>

I have to run out but it looks like you just have one line of code -  
try to copy over the standard includes in e.g. hello.dats  
Brandon Barker  
brandon…@gmail.comOn Wed, Jul 16, 2014 at 1:52 PM, Raoul Duke [rao...@gmail.com](mailto:rao...@gmail.com) wrote:

> hi,
> 
> i used brew to install ats-2 on a mac.
> 
> - i tried the most basic, i think, hello world example.
> 
> - it spits out a lot of stuff that i didn’t ask for; if things are  
> working, don’t bother telling me, and don’t use “!” as if it is a  
> miracle that it worked. it sure makes it hard to see where any _real_  
> problems are.
> 
> - it gives me errors. they are obtuse to first time users. what do i  
> need to change to make this work?
> 
> thanks for any help. (version at the bottom)
> 
> ATS 533 $ cat test.dats
> 
> implement main() = print(“Hello World\n”);
> 
> ATS 534 $ patscc test.dats
> 
> exec(patsopt --output test\_dats.c --dynamic test.dats)
> 
> Hello from ATS2(ATS/Postiats)!
> 
> Loading [fixity.ats] starts!
> 
> Loading [fixity.ats] finishes!
> 
> Loading [basics\_pre.sats] starts!
> 
> Loading [basics\_pre.sats] finishes!
> 
> Loading [basics\_sta.sats] starts!
> 
> Loading [basics\_sta.sats] finishes!
> 
> Loading [basics\_dyn.sats] starts!
> 
> Loading [basics\_dyn.sats] finishes!
> 
> Loading [basics\_gen.sats] starts!
> 
> Loading [basics\_gen.sats] finishes!
> 
> The 1st translation (fixity) of [test.dats] is successfully completed!
> 
> The 2nd translation (binding) of [test.dats] is successfully completed!
> 
> /Users/x/Downloads/tmp/ATS/test.dats: 20(line=1, offs=20) –  
> 41(line=1, offs=41): error(3):  
> [/home/hwxi/research/Postiats/git/src/pats\_trans3\_util.dats]:  
> d3exp\_trdn: the dynamic expression cannot be assigned the type  
> [S2Eapp(S2Ecst(g0int\_t0ype); S2Ecst(int\_kind))].
> 
> /Users/x/Downloads/tmp/ATS/test.dats: 20(line=1, offs=20) –  
> 41(line=1, offs=41): error(3): mismatch of static terms (tyleq):
> 
> The actual term is: S2Ecst(atsvoid\_t0ype)
> 
> The needed term is: S2Eapp(S2Ecst(g0int\_t0ype); S2Ecst(int\_kind))
> 
> TRANS3: there are [1] errors in total.
> 
> exit(ATS): uncaught exception:  
> \_2home\_2hwxi\_2research\_2Postiats\_2git\_2src\_2pats\_error\_2esats\_\_FatalErrorException(1025)
> 
> exec(patsopt --output test\_dats.c --dynamic test.dats) = 256
> 
> ATS 540 $ patscc -v
> 
> exec(gcc -std=c99 -D\_XOPEN\_SOURCE -I${PATSHOME}  
> -I${PATSHOME}/ccomp/runtime -L${PATSHOME}/ccomp/atslib/lib  
> -L${PATSHOME}/ccomp/atslib/lib64 -v)
> 
> Using built-in specs.
> 
> Target: i686-apple-darwin11
> 
> Configured with:  
> /private/var/tmp/llvmgcc42/llvmgcc42-2335.15~25/src/configure  
> –disable-checking --enable-werror  
> –prefix=/Developer/usr/llvm-gcc-4.2 --mandir=/share/man  
> –enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm-  
> –program-transform-name=/\[1\][^.-]\*$/s/$/-4.2/  
> –with-slibdir=/usr/lib --build=i686-apple-darwin11  
> –enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2335.15~25/dst-llvmCore/Developer/usr/local  
> –program-prefix=i686-apple-darwin11- --host=x86\_64-apple-darwin11  
> –target=i686-apple-darwin11  
> –with-gxx-include-dir=/usr/include/c++/4.2.1
> 
> Thread model: posix
> 
> gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)
> 
> exec(gcc -std=c99 -D\_XOPEN\_SOURCE -I${PATSHOME}  
> -I${PATSHOME}/ccomp/runtime -L${PATSHOME}/ccomp/atslib/lib  
> -L${PATSHOME}/ccomp/atslib/lib64 -v) = 0
> 
> –  
> 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/CAJ7XQb4sTxfZ\_8oVXAWOny3R%2By3\_\_xvBKM5cZtmr0Bxq1Kn8mg%40mail.gmail.com](https://groups.google.com/d/msgid/ats-lang-users/CAJ7XQb4sTxfZ_8oVXAWOny3R%2By3__xvBKM5cZtmr0Bxq1Kn8mg%40mail.gmail.com).

* * *

1. cg
