Skip to content

Commit

Permalink
Updating: very very minorly
Browse files Browse the repository at this point in the history
  • Loading branch information
githwxi committed Sep 15, 2024
1 parent 7c656a2 commit bc9ef44
Show file tree
Hide file tree
Showing 4 changed files with 233 additions and 1 deletion.
2 changes: 1 addition & 1 deletion xatslib/githwxi/DATS/CATS/JS/NODE/myfil00.cats
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@ XATS2JS_NODE_myfil00$fpath_readall$fwork
//
////////////////////////////////////////////////////////////////////////.
////////////////////////////////////////////////////////////////////////.
// end of [ATS3/XANADU_prelude_DATS_CATS_JS_NODE_myfil00.cats]
// end of [ATS3/XANADU_xatslib_githwxi_DATS_CATS_JS_NODE_myfil00.cats]
////////////////////////////////////////////////////////////////////////.
////////////////////////////////////////////////////////////////////////.
56 changes: 56 additions & 0 deletions xatslib/libcats/DATS/CATS/JS/NODE/gbas000.cats
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]
////////////////////////////////////////////////////////////////////////.
////////////////////////////////////////////////////////////////////////.
56 changes: 56 additions & 0 deletions xatslib/libcats/DATS/CATS/JS/NODE/gbas000.dats
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] *)
120 changes: 120 additions & 0 deletions xatslib/libcats/DATS/gbas000.dats
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] *)

0 comments on commit bc9ef44

Please sign in to comment.