gmhwxi
October 23, 2014, 4:47pm
1
Pure-0.63 was released yesterday:
https://groups.google.com/forum/?fromgroups#!topic/pure-lang/grNVDlp49rY
There is now support in Pure for direct use of ATS external code. Here is
an example:
%< -*- ATS -*-
#include
"share/atspre_staload.hats"
//
// A recursive definition of the factorial relation.
// FACT (n, r) means that the factorial of n equals r
//
dataprop
FACT (int, int) =
| FACTbas (0, 1)
| {n:nat}{r1:int} FACTind (n, n*r1) of FACT (n-1, r1)
//
// Declare fact_ats as an ATS function that is referred to in C by the
// the same name. When applied to a given integer n, this function returns
// an integer r such that r is guaranteed to satisfy the relation FACT(n, r).
//
extern
fun
fact_ats
This file has been truncated. show original
I essentially modified a similar one by Barry Schwartz.
Cheers!
It does look very interesting
martinOn Thu, Oct 23, 2014 at 1:17 PM, gmhwxi gmh...@gmail.com wrote:
I started to learn a bit Pure yesterday.
So I have only had very little exposure to Pure so far.
For now, I see that Pure can be used to write scripts for testing ATS code.
And what sort of data structures can be passed or shared between the two?
This is what I am trying to find out
On Thursday, October 23, 2014 4:05:31 PM UTC-4, Martin DeMello wrote:
Is the idea that the main code is written in pure, calling into functions
written in ATS? And what sort of data structures can be passed or shared
between the two?
martin
On Thu, Oct 23, 2014 at 9:47 AM, gmhwxi gmh...@gmail.com wrote:
Pure-0.63 was released yesterday:
Redirecting to Google Groups
There is now support in Pure for direct use of ATS external code. Here
is an example:
https://github.com/githwxi/ATS-Postiats/blob/master/doc/
EXAMPLE/Pure/fact_dats.pure
I essentially modified a similar one by Barry Schwartz.
Cheers!
–
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 .
To post to this group, send email to ats-l...@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/846dda2f-f6be-4271-a984-7cda01304468%
40googlegroups.com
https://groups.google.com/d/msgid/ats-lang-users/846dda2f-f6be-4271-a984-7cda01304468%40googlegroups.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 .
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/426e6e68-59f8-4760-b4b7-b9cec4dd1e5a%40googlegroups.com
https://groups.google.com/d/msgid/ats-lang-users/426e6e68-59f8-4760-b4b7-b9cec4dd1e5a%40googlegroups.com?utm_medium=email&utm_source=footer
.
Is the idea that the main code is written in pure, calling into functions
written in ATS? And what sort of data structures can be passed or shared
between the two?
martinOn Thu, Oct 23, 2014 at 9:47 AM, gmhwxi gmh...@gmail.com wrote:
Pure-0.63 was released yesterday:
Redirecting to Google Groups
There is now support in Pure for direct use of ATS external code. Here is
an example:
https://github.com/githwxi/ATS-Postiats/blob/master/doc/EXAMPLE/Pure/fact_dats.pure
I essentially modified a similar one by Barry Schwartz.
Cheers!
–
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/846dda2f-f6be-4271-a984-7cda01304468%40googlegroups.com
https://groups.google.com/d/msgid/ats-lang-users/846dda2f-f6be-4271-a984-7cda01304468%40googlegroups.com?utm_medium=email&utm_source=footer
.
gmhwxi
October 23, 2014, 8:17pm
4
I started to learn a bit Pure yesterday.
So I have only had very little exposure to Pure so far.
For now, I see that Pure can be used to write scripts for testing ATS code.
And what sort of data structures can be passed or shared between the two?
This is what I am trying to find out :)On Thursday, October 23, 2014 4:05:31 PM UTC-4, Martin DeMello wrote:
Is the idea that the main code is written in pure, calling into functions
written in ATS? And what sort of data structures can be passed or shared
between the two?
martin
On Thu, Oct 23, 2014 at 9:47 AM, gmhwxi <gmh...@gmail.com <javascript:>> wrote:
Pure-0.63 was released yesterday:
Redirecting to Google Groups
There is now support in Pure for direct use of ATS external code. Here is
an example:
https://github.com/githwxi/ATS-Postiats/blob/master/doc/EXAMPLE/Pure/fact_dats.pure
I essentially modified a similar one by Barry Schwartz.
Cheers!
–
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 <javascript:>.
To post to this group, send email to ats-l...@googlegroups.com
<javascript:>.
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/846dda2f-f6be-4271-a984-7cda01304468%40googlegroups.com
https://groups.google.com/d/msgid/ats-lang-users/846dda2f-f6be-4271-a984-7cda01304468%40googlegroups.com?utm_medium=email&utm_source=footer
.