diff --git a/prelude/DATS/CATS/JS/gdbg000.cats b/prelude/DATS/CATS/JS/gdbg000.cats index e31f10da8..680d012d2 100644 --- a/prelude/DATS/CATS/JS/gdbg000.cats +++ b/prelude/DATS/CATS/JS/gdbg000.cats @@ -36,11 +36,11 @@ Authoremail: gmhwxiATgmailDOTcom ////////////////////////////////////////////////////////////////////////. // function -XATS2JS_bool_assert_errmsg +XATS2JS_bool_assert$errmsg (cond, emsg) { if (!cond) { - throw new Error("XATS2JS_bool_assert_errmsg: emsg = " + emsg) + throw new Error("XATS2JS_bool_assert$errmsg: emsg = " + emsg) } ; return // HX: void is returned! } // diff --git a/prelude/DATS/CATS/PY/char000.cats b/prelude/DATS/CATS/PY/char000.cats index fae3ceaa3..f0edba360 100644 --- a/prelude/DATS/CATS/PY/char000.cats +++ b/prelude/DATS/CATS/PY/char000.cats @@ -51,12 +51,11 @@ def XATS2PY_char_neq(c1, c2): ## ########################################################################. ## -def XATS2PY_char_add$sint(c1, i2): +def XATS2PY_char_add_sint(c1, i2): c2 = c1+i2 return (c2%256) ## HX: char=int8 -} ## -def XATS2PY_char_sub$char(c1, c2): +def XATS2PY_char_sub_char(c1, c2): return (c1 - c2) ## HX: char=int8 ## ########################################################################. diff --git a/prelude/DATS/CATS/PY/gdbg000.cats b/prelude/DATS/CATS/PY/gdbg000.cats index 58dca53a1..f2b88340e 100644 --- a/prelude/DATS/CATS/PY/gdbg000.cats +++ b/prelude/DATS/CATS/PY/gdbg000.cats @@ -36,7 +36,7 @@ ########################################################################. ## def XATS2PY_bool_assert_errmsg(cond, emsg): - if (!cond): + if not(cond): raise Exception("XATS2PY_bool_assert_errmsg: emsg = " + emsg) return ## HX: void is returned! ## diff --git a/prelude/DATS/CATS/PY/gdbg000.dats b/prelude/DATS/CATS/PY/gdbg000.dats new file mode 100644 index 000000000..331558a96 --- /dev/null +++ b/prelude/DATS/CATS/PY/gdbg000.dats @@ -0,0 +1,60 @@ +(***********************************************************************) +(* *) +(* 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 Dec 29 12:48:55 PM EST 2024 +Authoremail: gmhwxiATgmailDOTcom +*) +// +(* ****** ****** *) +(* ****** ****** *) +// +#impltmp +<(*tmp*)> +bool_assert$errmsg + (cond, emsg) = +( +XATS2JS_bool_assert$errmsg + (cond, emsg)) where +{ +#extern +fun +XATS2JS_bool_assert$errmsg +(cond: bool, emsg: strm): void = $extnam() +} +// +(* ****** ****** *) +(* ****** ****** *) +// +(* ****** ****** *)(* ****** ****** *) +(* ****** ****** *)(* ****** ****** *) + +(* end of [ATS3/XANADU_prelude_DATS_CATS_JS_gdbg000.dats] *) diff --git a/prelude/DATS/CATS/PY/gflt000.cats b/prelude/DATS/CATS/PY/gflt000.cats index fcaa46950..2ff85383c 100644 --- a/prelude/DATS/CATS/PY/gflt000.cats +++ b/prelude/DATS/CATS/PY/gflt000.cats @@ -5,24 +5,24 @@ ########################################################################. ## -** 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. +## 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. ## ########################################################################. diff --git a/prelude/DATS/CATS/PY/gint000.cats b/prelude/DATS/CATS/PY/gint000.cats index 9da1274bc..9ec9c58fd 100644 --- a/prelude/DATS/CATS/PY/gint000.cats +++ b/prelude/DATS/CATS/PY/gint000.cats @@ -51,9 +51,9 @@ def XATS2PY_sint_gte_sint(i1, i2): return (i1 >= i2) ## HX: gte ## def XATS2PY_sint_eq_sint(i1, i2): - return (i1 === i2) ## HX: equal + return (i1 == i2) ## HX: equal def XATS2PY_sint_neq_sint(i1, i2): - return (i1 !== i2) ## HX: noteq + return (i1 != i2) ## HX: noteq ## ########################################################################. ##