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 Dec 29, 2024
1 parent 77e8de7 commit 5c65b9c
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 26 deletions.
4 changes: 2 additions & 2 deletions prelude/DATS/CATS/JS/gdbg000.cats
Original file line number Diff line number Diff line change
Expand Up @@ -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!
}
//
Expand Down
5 changes: 2 additions & 3 deletions prelude/DATS/CATS/PY/char000.cats
Original file line number Diff line number Diff line change
Expand Up @@ -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
##
########################################################################.
Expand Down
2 changes: 1 addition & 1 deletion prelude/DATS/CATS/PY/gdbg000.cats
Original file line number Diff line number Diff line change
Expand Up @@ -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!
##
Expand Down
60 changes: 60 additions & 0 deletions prelude/DATS/CATS/PY/gdbg000.dats
Original file line number Diff line number Diff line change
@@ -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] *)
36 changes: 18 additions & 18 deletions prelude/DATS/CATS/PY/gflt000.cats
Original file line number Diff line number Diff line change
Expand Up @@ -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.
##

########################################################################.
Expand Down
4 changes: 2 additions & 2 deletions prelude/DATS/CATS/PY/gint000.cats
Original file line number Diff line number Diff line change
Expand Up @@ -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
##
########################################################################.
##
Expand Down

0 comments on commit 5c65b9c

Please sign in to comment.