This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all: base64 | |
base64: base64.dats | |
atscc -o base64 base64.dats |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ATS factorial proof examples, based on F* tutorial examples at: | |
// https://www.fstar-lang.org/tutorial/ | |
// | |
// patsopt -tc --constraint-export -d fact_z3_threaded.dats |patsolve_z3 -i | |
// | |
#include "share/atspre_define.hats" | |
#include "share/atspre_staload.hats" | |
stacst fact: int -> int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ATS factorial proof examples, based on F* tutorial examples at: | |
// https://www.fstar-lang.org/tutorial/ | |
// | |
// patsopt -tc --constraint-export -d fact_prop.dats |patsolve_z3 -i | |
// | |
#include "share/atspre_define.hats" | |
#include "share/atspre_staload.hats" | |
dataprop FACT (int, int) = | |
| FACTzero (0, 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Build musl libc | |
$ git clone git://git.musl-libc.org/musl | |
$ cd musl | |
$ ./configure | |
$ make | |
$ sudo make install | |
$ export PATH=$PATH:/usr/local/musl/bin/ | |
# build libz for musl | |
$ wget https://zlib.net/zlib-1.2.11.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Build musl libc | |
$ git clone git://git.musl-libc.org/musl | |
$ cd musl | |
$ ./configure | |
$ make | |
$ sudo make install | |
$ export PATH=$PATH:/usr/local/musl/bin/ | |
# build libz for musl | |
$ wget https://zlib.net/zlib-1.2.11.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( | | |
"_" parent* = traits oddball. | |
object = (| eval = ( |dict = dictionary copy| | |
members elements do: [|:v. :k| | |
dict at: v string eval Put: v value eval | |
]. | |
dict | |
) | |
|). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Building Terralang (http://terralang.org/) from source | |
$ export BUILD_ROOT=`pwd` | |
# Build LLVM 3.9 | |
$ git clone https://github.com/llvm-mirror/llvm --branch release_39 | |
$ cd $(BUILD_ROOT)/llvm/tools | |
$ git clone https://github.com/llvm-mirror/clang --branch release_39 | |
$ cd $(BUILD_ROOT)/llvm | |
$ mkdir build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* | |
$ patscc -o gadt gadt.dats | |
$ ./gadt | |
res1=true and res2=8 | |
*) | |
#include "share/atspre_define.hats" | |
#include "share/atspre_staload.hats" | |
datatype Expr (t@ype) = | |
| I(int) of int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat hello.dats | |
implement main0() = print!("Hello World\n") | |
$ patscc -atsccomp "/usr/local/musl/bin/musl-gcc" -static -I$PATSHOME/ccomp/runtime -I$PATSHOME hello.dats | |
$ ./a.out | |
Hello World | |
$ ldd ./a.out | |
not a dynamic executable | |
$ strip ./a.out | |
$ ls -l ./a.out | |
-rwxr-xr-x 1 user user 18080 Aug 28 18:29 a.out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all: stack1 stack2 stack3 stack4 stack5 | |
stack1: stack1.dats | |
atscc -o stack1 stack1.dats | |
stack2: stack2.dats | |
atscc -o stack2 stack2.dats | |
stack3: stack3.dats | |
atscc -tc stack3.dats |
NewerOlder