From 66567a14a47e0e98a6a9a69a42fa66932727299d Mon Sep 17 00:00:00 2001 From: Hongwei Date: Sat, 29 Jul 2023 10:33:48 -0400 Subject: [PATCH] Updating: very very minorly --- srcgen2/DATS/staexp2_print0.dats | 4 ++-- srcgen2/DATS/statyp2_print0.dats | 3 +++ srcgen2/DATS/tread33_staexp.dats | 22 ++++++++++++++++++---- srcgen2/SATS/statyp2.sats | 4 +++- srcgen2/TEST/JS/test36_xatsopt.dats | 2 ++ 5 files changed, 28 insertions(+), 7 deletions(-) diff --git a/srcgen2/DATS/staexp2_print0.dats b/srcgen2/DATS/staexp2_print0.dats index 1487a013d..2c7a69424 100644 --- a/srcgen2/DATS/staexp2_print0.dats +++ b/srcgen2/DATS/staexp2_print0.dats @@ -359,8 +359,8 @@ S2Enone1(s1e1) => print("S2Enone1(",s1e1,")") | S2Enone2(s2e1) => print("S2Enone2(",s2e1,")") // -| -S2Eerrck(lvl0,s2e1) => print("S2Eerrck(",lvl0,";",s2e1,")") +|S2Eerrck // HX: tread-error +(lvl0,s2e1) => print("S2Eerrck(",lvl0,";",s2e1,")") // end (*let*) // end of [s2exp_fprint(out, s2e0)] diff --git a/srcgen2/DATS/statyp2_print0.dats b/srcgen2/DATS/statyp2_print0.dats index b36c2d3b0..92497fbf1 100644 --- a/srcgen2/DATS/statyp2_print0.dats +++ b/srcgen2/DATS/statyp2_print0.dats @@ -168,6 +168,9 @@ T2Pnone1(t2p1) => print("T2Pnone1(",t2p1,")") | T2Ps2exp(s2e1) => print("T2Ps2exp(",s2e1,")") // +|T2Perrck // HX: tread-error +(lvl0,t2p1) => print("T2Perrck(",lvl0,";",t2p1,")") +// end (*let*) // end of [s2typ_fprint(out,t2p0)] // (* ****** ****** *) diff --git a/srcgen2/DATS/tread33_staexp.dats b/srcgen2/DATS/tread33_staexp.dats index a479ba154..7ba70a3e7 100644 --- a/srcgen2/DATS/tread33_staexp.dats +++ b/srcgen2/DATS/tread33_staexp.dats @@ -64,6 +64,19 @@ ATS_PACKNAME // (* ****** ****** *) // +fun +s2typ_errck +(lvl0: sint +,t2p0: s2typ): s2typ = +let +val s2t0 = t2p0.sort() +in//let +s2typ_make_node +(s2t0, T2Perrck(lvl0,t2p0)) +end//let//end-of(s2typ_errck) +// +(* ****** ****** *) +// #implfun tread33_s2typ ( t2p0, err ) = @@ -72,11 +85,12 @@ case+ t2p0.node() of // | _(* otherwise *) => +let +val lvl0 = 1 +in//let ( - s2typ_none1(t2p0)) where -{ - val () = ( err := err + 1 ) -} // end of [ _(* otherwise *) ] +err := err+1; s2typ_errck(lvl0,t2p0)) +endlet // end of [ _(* otherwise *) ] ) where // end-of-[(*case+(t2p0)-of*)] { // diff --git a/srcgen2/SATS/statyp2.sats b/srcgen2/SATS/statyp2.sats index 74244f655..ebcfdd0ab 100644 --- a/srcgen2/SATS/statyp2.sats +++ b/srcgen2/SATS/statyp2.sats @@ -212,7 +212,9 @@ T2Ptrcd of |T2Pnone0 of ((*0*)) // HX: optional |T2Pnone1 of (s2typ) | T2Ps2exp of (s2exp) // -// HX-2022-11-04: end of [datatype(s2typ_node) +|T2Perrck of (int(*lvl*), s2typ)//HX:tread-error +// +// end of [s2type_node] // end of [ datatype(...) ] // (* ****** ****** *) fun diff --git a/srcgen2/TEST/JS/test36_xatsopt.dats b/srcgen2/TEST/JS/test36_xatsopt.dats index 3843818cc..54a5f9164 100644 --- a/srcgen2/TEST/JS/test36_xatsopt.dats +++ b/srcgen2/TEST/JS/test36_xatsopt.dats @@ -347,6 +347,8 @@ #include "./../../DATS/tread33.dats" #include +"./../../DATS/tread33_staexp.dats" +#include "./../../DATS/tread33_dynexp.dats" #include "./../../DATS/tread33_decl00.dats"