diff --git a/prelude/DATS/CATS/JS/gint000.cats b/prelude/DATS/CATS/JS/gint000.cats index c2e07eef2..3f5f94524 100644 --- a/prelude/DATS/CATS/JS/gint000.cats +++ b/prelude/DATS/CATS/JS/gint000.cats @@ -125,6 +125,16 @@ XATS2JS_sint_mod_sint } // ////////////////////////////////////////////////////////////////////////. +// +function +XATS2JS_sint_print + ( i0 ) +{ + let cs = i0.toString() + XATS2JS_the_print_store.push(cs); return +} +// +////////////////////////////////////////////////////////////////////////. ////////////////////////////////////////////////////////////////////////. // end of [ATS3/XANADU_prelude_DATS_CATS_JS_gint000.cats] ////////////////////////////////////////////////////////////////////////. diff --git a/prelude/DATS/CATS/JS/gint000.dats b/prelude/DATS/CATS/JS/gint000.dats index c0ce622d7..c612a8e18 100644 --- a/prelude/DATS/CATS/JS/gint000.dats +++ b/prelude/DATS/CATS/JS/gint000.dats @@ -228,7 +228,7 @@ where { #extern fun -XATS2JS_sint_print(c0: sint): void = $extnam() +XATS2JS_sint_print(i0: sint): void = $extnam() } // (* ****** ****** *) diff --git a/prelude/DATS/CATS/JS/strn000.cats b/prelude/DATS/CATS/JS/strn000.cats index 94c2afaaa..0ea2bfacc 100644 --- a/prelude/DATS/CATS/JS/strn000.cats +++ b/prelude/DATS/CATS/JS/strn000.cats @@ -86,6 +86,15 @@ XATS2JS_strn_fmake_fwork } // ////////////////////////////////////////////////////////////////////////. +// +function +XATS2JS_strn_print + ( cs ) +{ + XATS2JS_the_print_store.push(cs); return +} +// +////////////////////////////////////////////////////////////////////////. ////////////////////////////////////////////////////////////////////////. // end of [ATS3/XANADU_prelude_DATS_CATS_JS_strn000.cats] ////////////////////////////////////////////////////////////////////////. diff --git a/prelude/DATS/CATS/JS/xtop000.cats b/prelude/DATS/CATS/JS/xtop000.cats new file mode 100644 index 000000000..123439dc1 --- /dev/null +++ b/prelude/DATS/CATS/JS/xtop000.cats @@ -0,0 +1,51 @@ +////////////////////////////////////////////////////////////////////////. +// //. +// 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 +Thu 05 Sep 2024 11:21:07 AM EDT +Authoremail: gmhwxiATgmailDOTcom +*/ +////////////////////////////////////////////////////////////////////////. +////////////////////////////////////////////////////////////////////////. +// +const +XATS2JS_the_print_store = [] // HX: for prints? +// +const +XATS2JS_the_prout_store = [] // HX: for general output +// +const +XATS2JS_the_prerr_store = [] // HX: for reporting errors +// +////////////////////////////////////////////////////////////////////////. +////////////////////////////////////////////////////////////////////////. +// end of [ATS3/XANADU_prelude_DATS_CATS_JS_xtop000.cats] +////////////////////////////////////////////////////////////////////////. +////////////////////////////////////////////////////////////////////////. diff --git a/srcgen2/xats2js/srcgen1/xshared/runtime/Makefile b/srcgen2/xats2js/srcgen1/xshared/runtime/Makefile index 0da66dd1d..fc3f1666f 100644 --- a/srcgen2/xats2js/srcgen1/xshared/runtime/Makefile +++ b/srcgen2/xats2js/srcgen1/xshared/runtime/Makefile @@ -22,6 +22,11 @@ prelude:: ; \ $(CAT) xats2js_prelude_hd >> $(PRELUDE_JS) ############################################################### prelude:: \ +xtop000 +xtop000: ; \ +$(CAT) $(PRELUDED)/DATS/CATS/JS/xtop000.cats >> $(PRELUDE_JS) +############################################################### +prelude:: \ gint000 gint000: ; \ $(CAT) $(PRELUDED)/DATS/CATS/JS/gint000.cats >> $(PRELUDE_JS)