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 Jul 29, 2023
1 parent 2c48404 commit 66567a1
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 7 deletions.
4 changes: 2 additions & 2 deletions srcgen2/DATS/staexp2_print0.dats
Original file line number Diff line number Diff line change
Expand Up @@ -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)]

Expand Down
3 changes: 3 additions & 0 deletions srcgen2/DATS/statyp2_print0.dats
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
//
(* ****** ****** *)
Expand Down
22 changes: 18 additions & 4 deletions srcgen2/DATS/tread33_staexp.dats
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) =
Expand All @@ -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*)]
{
//
Expand Down
4 changes: 3 additions & 1 deletion srcgen2/SATS/statyp2.sats
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions srcgen2/TEST/JS/test36_xatsopt.dats
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,8 @@
#include
"./../../DATS/tread33.dats"
#include
"./../../DATS/tread33_staexp.dats"
#include
"./../../DATS/tread33_dynexp.dats"
#include
"./../../DATS/tread33_decl00.dats"
Expand Down

0 comments on commit 66567a1

Please sign in to comment.