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 9, 2024
1 parent 038baf6 commit 1b021bc
Show file tree
Hide file tree
Showing 12 changed files with 339 additions and 19 deletions.
9 changes: 9 additions & 0 deletions prelude/DATS/CATS/JS/NODE/node000.cats
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,15 @@ XATS2JS_NODE_char_print
////////////////////////////////////////////////////////////////////////.
//
function
XATS2JS_NODE_dflt_print
(f0)
{
XATS2JS_NODE_g_print(f0);
return; // XATS2JS_NODE_dflt_print
}
////////////////////////////////////////////////////////////////////////.
//
function
XATS2JS_NODE_strn_print
(cs)
{
Expand Down
12 changes: 12 additions & 0 deletions prelude/DATS/CATS/JS/NODE/node000.dats
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,18 @@ XATS2JS_NODE_char_print(b0: char): void = $extnam()
(* ****** ****** *)
//
#impltmp
dflt_print<> =
XATS2JS_NODE_dflt_print
where
{
#extern
fun
XATS2JS_NODE_dflt_print(f0: dflt): void = $extnam()
}
//
(* ****** ****** *)
//
#impltmp
strn_print<> =
XATS2JS_NODE_strn_print
where
Expand Down
64 changes: 64 additions & 0 deletions prelude/DATS/CATS/JS/gflt000.dats
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
(***********************************************************************)
(* *)
(* 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
Mon 09 Sep 2024 06:12:39 PM EDT
Authoremail: gmhwxiATgmailDOTcom
*)
//
(* ****** ****** *)
(* ****** ****** *)
//
(*
HX-2024-09-05:
Mon 09 Sep 2024 06:13:03 PM EDT
*)
//
#impltmp
<(*tmp*)>
dflt_print
( f0 ) =
(
XATS2JS_dflt_print
( f0 )) where
{
#extern
fun
XATS2JS_dflt_print(f0: dflt): void = $extnam()
}
//
(* ****** ****** *)
(* ****** ****** *)
//
(* ****** ****** *)(* ****** ****** *)
(* ****** ****** *)(* ****** ****** *)

(* end of [ATS3/XANADU_prelude_DATS_CATS_JS_gint000.dats] *)
1 change: 0 additions & 1 deletion prelude/DATS/CATS/JS/gint000.dats
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ XATS2JS_sint_mod_sint
(* ****** ****** *)
(* ****** ****** *)
//
//
(*
HX-2024-09-05:
Thu 05 Sep 2024 11:11:27 AM EDT
Expand Down
104 changes: 104 additions & 0 deletions prelude/DATS/gflt000.dats
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
(***********************************************************************)
(* *)
(* 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
(*
Mon 09 Sep 2024 06:17:35 PM EDT
*)
Authoremail: gmhwxiATgmailDOTcom
*)
//
(* ****** ****** *)
(* ****** ****** *)
#staload UN =
"prelude/SATS/unsfx00.sats"
(* ****** ****** *)
(* ****** ****** *)
#typedef ni = nint
#typedef si = sint
#typedef df = dflt
(* ****** ****** *)
(* ****** ****** *)
#impltmp
g_0<df>() = (0.0)
#impltmp
g_1<df>() = (1.0)
(* ****** ****** *)
(* ****** ****** *)
//
#impltmp
g_lt<df> = dflt_lt_dflt<>
#impltmp
g_gt<df> = dflt_gt_dflt<>
#impltmp
g_eq<df> = dflt_eq_dflt<>
//
#impltmp
g_lte<df> = dflt_lte_dflt<>
#impltmp
g_gte<df> = dflt_gte_dflt<>
#impltmp
g_neq<df> = dflt_neq_dflt<>
//
#impltmp
g_cmp<df> = dflt_cmp_dflt<>
//
(* ****** ****** *)
(* ****** ****** *)
//
#impltmp
g_add<df> = dflt_add_dflt<>
#impltmp
g_sub<df> = dflt_sub_dflt<>
#impltmp
g_mul<df> = dflt_mul_dflt<>
#impltmp
g_div<df> = dflt_div_dflt<>
//
(* ****** ****** *)
(* ****** ****** *)
//
#impltmp
g_print<df> = dflt_print<>
//
(* ****** ****** *)
(* ****** ****** *)
//
#impltmp
<(*tmp*)>
dflt_neg( f1 ) = (0.0 - f1)
//
(* ****** ****** *)
(* ****** ****** *)
//
(* ****** ****** *)(* ****** ****** *)
(* ****** ****** *)(* ****** ****** *)

(* end of [ATS3/XANADU_prelude_DATS_gflt000.dats] *)
62 changes: 62 additions & 0 deletions prelude/SATS/gflt000.sats
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,68 @@ dflt_print(df: dflt): void
(* ****** ****** *)
(* ****** ****** *)
//
fun<>
dflt_lt_dflt
(f1: dflt, f2: dflt): bool
fun<>
dflt_gt_dflt
(f1: dflt, f2: dflt): bool
fun<>
dflt_eq_dflt
(f1: dflt, f2: dflt): bool
//
#symload < with dflt_lt_dflt of 1000
#symload > with dflt_gt_dflt of 1000
#symload = with dflt_eq_dflt of 1000
//
fun<>
dflt_lte_dflt
(f1: dflt, f2: dflt): bool
fun<>
dflt_gte_dflt
(f1: dflt, f2: dflt): bool
fun<>
dflt_neq_dflt
(f1: dflt, f2: dflt): bool
//
#symload <= with dflt_lte_dflt of 1000
#symload >= with dflt_gte_dflt of 1000
#symload != with dflt_neq_dflt of 1000
//
(* ****** ****** *)
//
fun<>
dflt_cmp_dflt(f1: dflt, f2: dflt): sint
#symload cmp with dflt_cmp_dflt of 1000
//
(* ****** ****** *)
(* ****** ****** *)
//
fun<>
dflt_add_dflt
(f1: dflt, f2: dflt): dflt
fun<>
dflt_sub_dflt
(f1: dflt, f2: dflt): dflt
fun<>
dflt_mul_dflt
(f1: dflt, f2: dflt): dflt
fun<>
dflt_div_dflt
(f1: dflt, f2: dflt): dflt
fun<>
dflt_mod_dflt
(f1: dflt, f2: dflt): dflt
//
#symload + with dflt_add_dflt of 1000
#symload - with dflt_sub_dflt of 1000
#symload * with dflt_mul_dflt of 1000
#symload / with dflt_div_dflt of 1000
#symload % with dflt_mod_dflt of 1000
//
(* ****** ****** *)
(* ****** ****** *)
//
(* ****** ****** *)(* ****** ****** *)
(* ****** ****** *)(* ****** ****** *)

Expand Down
4 changes: 4 additions & 0 deletions srcgen1/TEST/Makefile_prelude
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ $(XATSOPT) -s $(PRELUDE)/SATS/gint000.sats
all0_sats:: ; \
$(XATSOPT) -s $(PRELUDE)/SATS/gint001.sats
all0_sats:: ; \
$(XATSOPT) -s $(PRELUDE)/SATS/gflt000.sats
all0_sats:: ; \
$(XATSOPT) -s $(PRELUDE)/SATS/strn000.sats
all0_sats:: ; \
$(XATSOPT) -s $(PRELUDE)/SATS/strn001.sats
Expand Down Expand Up @@ -334,6 +336,8 @@ $(XATSOPT) -d $(PRELUDE)/DATS/gint000.dats
all0_dats:: ; \
$(XATSOPT) -d $(PRELUDE)/DATS/gint001.dats
all0_dats:: ; \
$(XATSOPT) -d $(PRELUDE)/DATS/gflt000.dats
all0_dats:: ; \
$(XATSOPT) -d $(PRELUDE)/DATS/strn000.dats
all0_dats:: ; \
$(XATSOPT) -d $(PRELUDE)/DATS/strn001.dats
Expand Down
Loading

0 comments on commit 1b021bc

Please sign in to comment.