-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
233 additions
and
1 deletion.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
////////////////////////////////////////////////////////////////////////. | ||
// //. | ||
// Applied Type System //. | ||
// //. | ||
////////////////////////////////////////////////////////////////////////. | ||
|
||
/* | ||
** ATS/Xanadu - Unleashing the Potential of Types! | ||
** Copyright (C) 2024 Hongwei Xi, ATS Trustful Software, Inc. | ||
** All rights reserved | ||
** | ||
** ATS is free software; you can redistribute it and/or modify it under | ||
** the terms of the GNU GENERAL PUBLIC LICENSE (GPL) as published by the | ||
** Free Software Foundation; either version 3, or (at your option) any | ||
** later version. | ||
** | ||
** ATS is distributed in the hope that it will be useful, but WITHOUT ANY | ||
** WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
** FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
** for more details. | ||
** | ||
** You should have received a copy of the GNU General Public License | ||
** along with ATS; see the file COPYING. If not, please write to the | ||
** Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA | ||
** 02110-1301, USA. | ||
*/ | ||
|
||
////////////////////////////////////////////////////////////////////////. | ||
////////////////////////////////////////////////////////////////////////. | ||
/* | ||
Author: Hongwei Xi | ||
Sun 15 Sep 2024 05:51:02 PM EDT | ||
Authoremail: gmhwxiATgmailDOTcom | ||
*/ | ||
////////////////////////////////////////////////////////////////////////. | ||
////////////////////////////////////////////////////////////////////////. | ||
// | ||
function | ||
XATS2JS_NODE_g_stdin() | ||
{ | ||
return process.stdin ; } | ||
// | ||
function | ||
XATS2JS_NODE_g_stdout() | ||
{ | ||
return process.stdout ; } | ||
function | ||
XATS2JS_NODE_g_stderr() | ||
{ | ||
return process.stderr ; } | ||
// | ||
////////////////////////////////////////////////////////////////////////. | ||
////////////////////////////////////////////////////////////////////////. | ||
// end of [ATS3/XANADU_xatslib_libcats_DATS_CATS_JS_NODE_gbas000.cats] | ||
////////////////////////////////////////////////////////////////////////. | ||
////////////////////////////////////////////////////////////////////////. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
(* ****** ****** *) | ||
(* ****** ****** *) | ||
(* | ||
HX-2024-09-05: | ||
Sun 15 Sep 2024 05:54:50 PM EDT | ||
*) | ||
(* ****** ****** *) | ||
(* ****** ****** *) | ||
// | ||
#staload "./../../../myfil00.dats" | ||
(* ****** ****** *) | ||
(* ****** ****** *) | ||
// | ||
#impltmp | ||
g_stdin<>() = | ||
( | ||
XATS2JS_NODE_g_stdin | ||
((*void*))) where | ||
{ | ||
#extern | ||
fun | ||
XATS2JS_NODE_g_stdin(): FILR = $extnam() | ||
} | ||
// | ||
(* ****** ****** *) | ||
// | ||
#impltmp | ||
g_stdout<>() = | ||
( | ||
XATS2JS_NODE_g_stdout | ||
((*void*))) where | ||
{ | ||
#extern | ||
fun | ||
XATS2JS_NODE_g_stdout(): FILR = $extnam() | ||
} | ||
// | ||
// | ||
#impltmp | ||
g_stderr<>() = | ||
( | ||
XATS2JS_NODE_g_stderr | ||
((*void*))) where | ||
{ | ||
#extern | ||
fun | ||
XATS2JS_NODE_g_stderr(): FILR = $extnam() | ||
} | ||
// | ||
(* ****** ****** *) | ||
(* ****** ****** *) | ||
// | ||
(* ****** ****** *)(* ****** ****** *)(* ****** ****** *) | ||
(* ****** ****** *)(* ****** ****** *)(* ****** ****** *) | ||
|
||
(* end of [ATS3/XANADU_xatslib_libcats_DATS_CATS_JS_NODE_gbas000.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
(* ****** ****** *) | ||
(* ****** ****** *) | ||
(* | ||
// | ||
HX-2024-09-15: | ||
Sun 15 Sep 2024 05:17:50 PM EDT | ||
// | ||
For various features originated | ||
from the C programming language system | ||
// | ||
*) | ||
(* ****** ****** *) | ||
(* ****** ****** *) | ||
// | ||
#abstbox | ||
FILR_tbox==p0tr(*FILE*) | ||
#typedef FILR = FILR_tbox | ||
// | ||
(* ****** ****** *) | ||
(* ****** ****** *) | ||
// | ||
fun<> | ||
g_stdin((*void*)): FILR | ||
// | ||
#extern | ||
fun<> | ||
g_stdout((*void*)): FILR | ||
#extern | ||
fun<> | ||
g_stderr((*void*)): FILR | ||
// | ||
(* ****** ****** *) | ||
(* ****** ****** *) | ||
// | ||
(* | ||
HX-2024-09-15: | ||
Should FILR_print_obj | ||
be used for FILR_gprint? | ||
Sun 15 Sep 2024 05:46:08 PM EDT | ||
*) | ||
#extern | ||
fun | ||
<x0:t0> | ||
FILR_gprint | ||
(out: FILR, obj: a): void | ||
// | ||
#symload | ||
fprint with FILR_gprint of 0100 | ||
// | ||
(* ****** ****** *) | ||
// | ||
#extern | ||
fun<> | ||
FILR_print_sint | ||
(out: FILR, obj: sint): void | ||
#extern | ||
fun<> | ||
FILR_print_bool | ||
(out: FILR, obj: bool): void | ||
#extern | ||
fun<> | ||
FILR_print_char | ||
(out: FILR, obj: char): void | ||
#extern | ||
fun<> | ||
FILR_print_dflt | ||
(out: FILR, obj: dflt): void | ||
#extern | ||
fun<> | ||
FILR_print_strn | ||
(out: FILR, obj: strn): void | ||
// | ||
#symload | ||
fprint with FILR_print_sint of 1000 | ||
#symload | ||
fprint with FILR_print_bool of 1000 | ||
#symload | ||
fprint with FILR_print_char of 1000 | ||
#symload | ||
fprint with FILR_print_dflt of 1000 | ||
#symload | ||
fprint with FILR_print_strn of 1000 | ||
// | ||
(* ****** ****** *) | ||
(* ****** ****** *) | ||
// | ||
#impltmp | ||
g_print<sint>(i0) = | ||
FILR_print_sint(g_stdout<>(), i0) | ||
#impltmp | ||
g_print<bool>(b0) = | ||
FILR_print_bool(g_stdout<>(), b0) | ||
#impltmp | ||
g_print<char>(c0) = | ||
FILR_print_char(g_stdout<>(), c0) | ||
// | ||
#impltmp | ||
g_print<dflt>(f0) = | ||
FILR_print_dflt(g_stdout<>(), f0) | ||
#impltmp | ||
g_print<strn>(cs) = | ||
FILR_print_strn(g_stdout<>(), cs) | ||
// | ||
(* ****** ****** *) | ||
(* ****** ****** *) | ||
// | ||
#impltmp | ||
< x0:t0 > | ||
FILR_gprint(out, obj) = | ||
let | ||
#impltmp | ||
g_stdout<>() = out in g_print<x0>(obj) end | ||
// | ||
(* ****** ****** *) | ||
(* ****** ****** *) | ||
// | ||
(* ****** ****** *)(* ****** ****** *)(* ****** ****** *) | ||
(* ****** ****** *)(* ****** ****** *)(* ****** ****** *) | ||
|
||
(* end of [ATS3/XANADU_xatslib_githwxi_DATS_gint000.dats] *) |