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 6246f1a commit 1c01a3b
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 10 deletions.
25 changes: 17 additions & 8 deletions srcgen2/DATS/fperr33_dynexp.dats
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,15 @@ D3Perrck(_,_) => fperr33_d3pat(out, d3p)
|
_(*otherwise*) =>
let
val
loc = d3p.lctn()
val () = prerrln
//
val loc = d3p.lctn((*void*))
val t2p = d3p.styp((*void*))
//
val ( ) = prerrln
("fperr33_d3pat: auxmain: loc = ", loc)
val () = prerrln
val ( ) = prerrln
("fperr33_d3pat: auxmain: t2p = ", t2p)
val ( ) = prerrln
("fperr33_d3pat: auxmain: d3p = ", d3p)
endlet
//
Expand Down Expand Up @@ -203,12 +207,17 @@ D3Eerrck(_,_) => fperr33_d3exp(out, d3e)
|
_(*otherwise*) =>
let
val
loc = d3e.lctn()
val () = prerrln
//
val loc = d3e.lctn((*void*))
val t2p = d3e.styp((*void*))
//
val ( ) = prerrln
("fperr33_d3exp: auxmain: loc = ", loc)
val () = prerrln
val ( ) = prerrln
("fperr33_d3exp: auxmain: t2p = ", t2p)
val ( ) = prerrln
("fperr33_d3exp: auxmain: d3e = ", d3e)
//
endlet
//
end (*let*) // end-of-[ auxmain(out, d3e) ]
Expand Down
6 changes: 4 additions & 2 deletions srcgen2/DATS/tread33_dynexp.dats
Original file line number Diff line number Diff line change
Expand Up @@ -192,14 +192,16 @@ endlet // end of [ _(* otherwise *) ]
#implfun
tread33_d3patlst
( d3ps, err ) =
list_tread33_fnp(d3ps, err, tread33_d3pat)
(
list_tread33_fnp(d3ps, err, tread33_d3pat))
//
(* ****** ****** *)
//
#implfun
tread33_d3explst
( d3es, err ) =
list_tread33_fnp(d3es, err, tread33_d3exp)
(
list_tread33_fnp(d3es, err, tread33_d3exp))
//
(* ****** ****** *)

Expand Down
51 changes: 51 additions & 0 deletions srcgen2/DATS/tread33_staexp.dats
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ ATS_PACKNAME
(* ****** ****** *)
//
(* ****** ****** *)
#symload styp with x2t2p_get_styp
(* ****** ****** *)
#symload node with s2typ_get_node
#symload sort with s2typ_get_sort
(* ****** ****** *)
Expand All @@ -77,13 +79,31 @@ end//let//end-of(s2typ_errck)
//
(* ****** ****** *)
//
fun
s2typ_lft_errck
(s2t0: sort2
,t2p1: s2typ): s2typ =
let
val lvl0 = 1
in//let
s2typ_errck
(lvl0, s2typ(s2t0, T2Plft(t2p1)))
end//let//end-of(s2typ_lft_errck(...))
//
(* ****** ****** *)
//
#implfun
tread33_s2typ
( t2p0, err ) =
(
case+
t2p0.node() of
//
|T2Pbas _ => t2p0
|T2Pcst _ => t2p0
//
|T2Plft _ => f0_lft(t2p0, err)
//
|T2Pxtv _ => f0_xtv(t2p0, err)
//
|
Expand All @@ -100,6 +120,29 @@ endlet // end of [ _(* otherwise *) ]
(* ****** ****** *)
//
fun
f0_lft
( t2p: s2typ
, err: &sint >> _): s2typ =
let
//
val e00 = err
//
val-
T2Plft(t2p1) = t2p.node()
//
val
t2p1 = tread33_s2typ(t2p1, err)
in//let
if
(err=e00)
then (t2p) else
(
s2typ_lft_errck(t2p.sort(), t2p1))
end(*let*)// end-of-[ f0_lft(t2p,err) ]
//
(* ****** ****** *)
//
fun
f0_xtv
( t2p: s2typ
, err: &sint >> _): s2typ =
Expand Down Expand Up @@ -131,5 +174,13 @@ prerrln("tread33_s2typ: t2p0 = ", t2p0)
} (*where*)//end[ tread33_s2typ(t2p0,err) ]
//
(* ****** ****** *)
//
#implfun
tread33_s2typlst
( t2ps, err ) =
(
list_tread33_fnp(t2ps, err, tread33_s2typ))
//
(* ****** ****** *)

(* end of [ATS3/XATSOPT_srcgen2_tread33_staexp.dats] *)
4 changes: 4 additions & 0 deletions srcgen2/SATS/tread33.sats
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ D3E = "./dynexp3.sats"
(* ****** ****** *)
#typedef d3ecl = $D3E.d3ecl
(* ****** ****** *)
#typedef s2typlst = $S2E.s2typlst
(* ****** ****** *)
#typedef d3patlst = $D3E.d3patlst
#typedef d3explst = $D3E.d3explst
(* ****** ****** *)
Expand Down Expand Up @@ -119,6 +121,8 @@ fun tread33_d3exp: ftread33(d3exp)
(* ****** ****** *)
fun tread33_d3ecl: ftread33(d3ecl)
(* ****** ****** *)
fun tread33_s2typlst: ftread33(s2typlst)
(* ****** ****** *)
fun tread33_d3patlst: ftread33(d3patlst)
fun tread33_d3explst: ftread33(d3explst)
(* ****** ****** *)
Expand Down

0 comments on commit 1c01a3b

Please sign in to comment.