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 Oct 4, 2024
1 parent a455bb6 commit 0a624ce
Show file tree
Hide file tree
Showing 6 changed files with 188 additions and 14 deletions.
15 changes: 15 additions & 0 deletions prelude/DATS/VT/strm000_vt.dats
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,21 @@ Authoremail: gmhwxiATgmailDOTcom
(* ****** ****** *)
//
#impltmp
<(*tmp*)>
strm_vt_nil() =
$llazy
(strmcon_vt_nil(*void*))
//
#impltmp
< a: vt >
strm_vt_cons(x0, xs) =
$llazy
(strmcon_vt_cons(x0, xs))
//
(* ****** ****** *)
(* ****** ****** *)
//
#impltmp
{ x0:vt }
g_free//~xs
<strm_vt(x0)>(xs) = $free(xs)
Expand Down
35 changes: 35 additions & 0 deletions prelude/DATS/gflt000.dats
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,41 @@ g_print<df> = dflt_print<>
//
#impltmp
<(*tmp*)>
dflt_lt_sint
(f1, i2) =
dflt_lt_dflt(f1, g_si<dflt>(i2))
#impltmp
<(*tmp*)>
dflt_gt_sint
(f1, i2) =
dflt_gt_dflt(f1, g_si<dflt>(i2))
#impltmp
<(*tmp*)>
dflt_eq_sint
(f1, i2) =
dflt_eq_dflt(f1, g_si<dflt>(i2))
//
#impltmp
<(*tmp*)>
dflt_lte_sint
(f1, i2) =
dflt_lte_dflt(f1, g_si<dflt>(i2))
#impltmp
<(*tmp*)>
dflt_gte_sint
(f1, i2) =
dflt_gte_dflt(f1, g_si<dflt>(i2))
#impltmp
<(*tmp*)>
dflt_neq_sint
(f1, i2) =
dflt_neq_dflt(f1, g_si<dflt>(i2))
//
(* ****** ****** *)
(* ****** ****** *)
//
#impltmp
<(*tmp*)>
dflt_neg( f1 ) = (0.0-f1)
//
(* ****** ****** *)
Expand Down
8 changes: 4 additions & 4 deletions prelude/SATS/VT/strm000_vt.sats
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,21 @@ Authoremail: gmhwxiATgmailDOTcom
(* ****** ****** *)
//
fun<>
strm_vt_nil_
strm_vt_nil
{a:vt}(): strm_vt(a)
fun<>
strq_vt_nil_
strq_vt_nil
{a:vt}(): strq_vt(a,0)
//
fun
<a:vt>
strm_vt_cons_
strm_vt_cons
(
x0: (a),
xs: strm_vt(a)): strm_vt(a)
fun
<a:vt>
strq_vt_cons_
strq_vt_cons
{n:i0}
(
x0: (a),
Expand Down
40 changes: 30 additions & 10 deletions srcgen2/DATS/fperr20_dynexp.dats
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,8 @@ in//let
case+
d2e.node() of
//
(* ****** ****** *)
//
|D2Esym0
(drxp,d1e1,dpis) =>
let
Expand Down Expand Up @@ -411,45 +413,63 @@ endlet
//
(* ****** ****** *)
//
|
D2Eaddr(d2e1) =>
|D2Eaddr(d2e1) =>
let
val () = fperr20_d2exp(out, d2e1)
endlet
|
D2Eview(d2e1) =>
|D2Eview(d2e1) =>
let
val () = fperr20_d2exp(out, d2e1)
endlet
//
(* ****** ****** *)
//
|
D2Eeval(d2e1) =>
|D2Eeval(d2e1) =>
let
val () = fperr20_d2exp(out, d2e1)
endlet
|
D2Efree(d2e1) =>
|D2Efree(d2e1) =>
let
val () = fperr20_d2exp(out, d2e1)
endlet
//
|
D2Eassgn
(* ****** ****** *)
//
|D2Eassgn
(d2el, d2er) =>
let
val () = fperr20_d2exp(out, d2el)
val () = fperr20_d2exp(out, d2er)
endlet
//
(* ****** ****** *)
//
|D2Ebrget
(dpis, d2es) =>
(
let
val () =
(
fperr20_d2explst(out, d2es))end)
|D2Ebrset
(dpis, d2es) =>
(
let
val () =
(
fperr20_d2explst(out, d2es))end)
//
(* ****** ****** *)
//
|
D2Eraise
(tknd, d2e1) =>
let
val () = fperr20_d2exp(out, d2e1)
endlet
//
(* ****** ****** *)
//
|
D2El0azy
(dsym, d2e1) =>
Expand Down
55 changes: 55 additions & 0 deletions srcgen2/UTIL/TEST/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
########################################################################
########################################################################
# HX-2024-10-04:
# Makefile for srcgen2/UTIL/TEST
########################################################################
########################################################################
CAT=cat
BUN=bun
ECHO=echo
NODE=node
########################################################################
########################################################################
all:: test01
########################################################################
########################################################################
testall:: test01; $(NODE) $<_out.js
########################################################################
########################################################################
SRCGEN2_SRCGENX=\
$(XATSHOME)/srcgen2/xats2js/srcgenx
SRCGEN2_XSHARED=\
$(XATSHOME)/srcgen2/xats2js/srcgenx/xshared/runtime
SRCGEN2_XATS2JS=\
$(XATSHOME)/srcgen2/xats2js/srcgenx/UTIL/xats2js_jsemit00_dats.js
########################################################################
########################################################################
test01:: ; \
echo "//" `date` > $@_out.js
############
test01:: ; \
$(CAT) $(SRCGEN2_XSHARED)/xats2js_js1emit.js >> $@_out.js
test01:: ; \
$(CAT) $(SRCGEN2_XSHARED)/xats2js_prelude.js >> $@_out.js
test01:: ; \
$(CAT) $(SRCGEN2_XSHARED)/xats2js_xatslib.js >> $@_out.js
test01:: ; \
$(CAT) $(SRCGEN2_XSHARED)/xats2js_prelude_node.js >> $@_out.js
############
test01:: test01_mydebug.dats; \
$(NODE) --stack-size=4096 $(SRCGEN2_XATS2JS) $< >> $@_out.js
############
# test01:: ; \
# npx google-closure-compiler -W QUIET \
# --compilation_level SIMPLE --js=$@_out.js --js_output_file=$@_out1.js
# test01:: ; \
# npx google-closure-compiler -W QUIET \
# --compilation_level ADVANCED --js=$@_out.js --js_output_file=$@_out2.js
########################################################################
########################################################################
clean:: ; rm -f *~
cleanall:: ; rm -f *~
cleanall:: ; rm -f test01_out.js
cleanall:: ; rm -f test01_out?.js
########################################################################
###################### end of [Makefile_jsemit] ########################
49 changes: 49 additions & 0 deletions srcgen2/UTIL/TEST/test01_mydebug.dats
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
(* ****** ****** *)
(* ****** ****** *)
(*
HX-2024-10-04:
Fri Oct 4 05:52:05 PM EDT 2024
*)
(* ****** ****** *)
(* ****** ****** *)
#staload UN =
"prelude/SATS/unsfx00.sats"
(* ****** ****** *)
(* ****** ****** *)
#staload _ =
"prelude/DATS/gdbg000.dats"
(* ****** ****** *)
(* ****** ****** *)
#include
"srcgen2\
/prelude/HATS/prelude_dats.hats"
#include
"xatslib\
/githwxi/HATS/githwxi_dats.hats"
(* ****** ****** *)
(* ****** ****** *)
#include
"srcgen2\
/prelude/HATS/prelude_JS_dats.hats"
#include
"xatslib/HATS/xatslib_JS_dats.hats"
(* ****** ****** *)
(* ****** ****** *)
//
#include
"srcgen2\
/prelude/HATS/prelude_NODE_dats.hats"
//
(* ****** ****** *)
(* ****** ****** *)
//
val () = prints
("Hello from [test01_mydebug]!\n")
//
(* ****** ****** *)
(* ****** ****** *)

(* ****** ****** *)(* ****** ****** *)(* ****** ****** *)
(* ****** ****** *)(* ****** ****** *)(* ****** ****** *)

(* end of [ATS-XANADU/srcgen2/UTIL/TEST/test01_mydebug.dats] *)

0 comments on commit 0a624ce

Please sign in to comment.