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 Aug 3, 2023
1 parent cdbaa61 commit 7b81c80
Show file tree
Hide file tree
Showing 4 changed files with 184 additions and 0 deletions.
79 changes: 79 additions & 0 deletions srcgen2/DATS/fperr33_dynexp.dats
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,85 @@ in//let
case+
d3e.node() of
//
|
D3Esapp
(d3f0,s2es) =>
let
val () =
fperr33_d3exp(out, d3f0)
(*
val () =
fperr33_s2explst(out, s2es)
*)
endlet
//
|
D3Etapp
(d3f0,s2es) =>
let
val () =
fperr33_d3exp(out, d3f0)
(*
val () =
fperr33_s2explst(out, s2es)
*)
endlet
//
|
D3Edapp
(d3f0
,npf1, d3es) =>
let
val () =
fperr33_d3exp(out, d3f0)
val () =
fperr33_d3explst(out, d3es)
endlet
//
|
D3Elet0
(dcls, d3e1) =>
(
fperr33_d3exp(out, d3e1))
where
{
val () =
fperr33_d3eclist(out, dcls)
}(*where*)//end-of-[D3Elet0]
|
D3Ewhere
(d3e1, dcls) =>
(
fperr33_d3exp(out, d3e1))
where
{
val () =
fperr33_d3eclist(out, dcls)
}(*where*)//end-of-[D3Ewhere]
//
|
D3Eift0
(d3e1,dthn,dels) =>
let
val () =
fperr33_d3exp(out, d3e1)
val () =
fperr33_d3expopt(out, dthn)
val () =
fperr33_d3expopt(out, dels)
endlet
//
|
D3Ecas0
(tknd,d3e1,dcls) =>
let
val () =
fperr33_d3exp(out, d3e1)
val () =
fperr33_d3clslst(out, dcls)
endlet
//
(* ****** ****** *)
//
|D3Enone0 _ => ( (*void*) )
|D3Enone1 _ => () | D3Enone2 _ => ()
Expand Down
36 changes: 36 additions & 0 deletions srcgen2/DATS/trans3a_dynexp.dats
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ d3e0.node() of
//
|D3Elet0 _ => f0_let0(env0, d3e0)
//
|D3Eift0 _ => f0_ift0(env0, d3e0)
|D3Ecas0 _ => f0_cas0(env0, d3e0)
//
|D3Eseqn _ => f0_seqn(env0, d3e0)
Expand Down Expand Up @@ -649,6 +650,41 @@ end (*let*)//end-of-[ f0_let0(env0,d3e0) ]
(* ****** ****** *)
//
fun
f0_ift0
( env0:
! tr3aenv
, d3e0: d3exp): d3exp =
let
//
val loc0 = d3e0.lctn()
//
val-
D3Eift0
(d3e1
,dthn, dels) = d3e0.node()
//
val t2p0 =
d3e0.styp((*0*))
val t2p0 =
s2typ_hnfiz0(t2p0)
val t2p0 =
trans3a_s2typ(env0, t2p0)
//
val d3e1 =
trans3a_d3exp(env0, d3e1)
val dthn =
trans3a_d3expopt(env0, dthn)
val dels =
trans3a_d3expopt(env0, dels)
//
in//let
d3exp_make_styp_node
(loc0, t2p0, D3Eift0(d3e1, dthn, dels))
end (*let*) // end of [f0_ift0(env0,d3e0)]
//
(* ****** ****** *)
//
fun
f0_cas0
( env0:
! tr3aenv
Expand Down
67 changes: 67 additions & 0 deletions srcgen2/DATS/tread33_dynexp.dats
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,28 @@ endlet//end of [d3exp_let0_errck(...)]
(* ****** ****** *)
//
fun
d3exp_ift0_errck
(loc0: loc_t
,t2p0: s2typ
,d3e1: d3exp
,dthn: d3expopt
,dels: d3expopt): d3exp =
let
val
lvl0 = gmax
( errvl(d3e1)
, errvl(dthn), errvl(dels))
in//let
d3exp_errck
(
lvl0+1,
d3exp_make_styp_node
(loc0,t2p0,D3Eift0(d3e1,dthn,dels)))
endlet // end of [d3exp_ift0_errck(...)]
//
(* ****** ****** *)
//
fun
d3exp_cas0_errck
(loc0: loc_t
,t2p0: s2typ
Expand Down Expand Up @@ -1021,6 +1043,7 @@ f0_var(d3e0, err)
//
|D3Elet0 _ => f0_let0(d3e0, err)
//
|D3Eift0 _ => f0_ift0(d3e0, err)
|D3Ecas0 _ => f0_cas0(d3e0, err)
//
|D3Eseqn _ => f0_seqn(d3e0, err)
Expand Down Expand Up @@ -1248,6 +1271,44 @@ end (*let*) // end of [ f0_let0(d3e,err) ]
(* ****** ****** *)
//
fun
f0_ift0
( d3e: d3exp
, err: &sint >> _): d3exp =
let
//
val e00 = err
//
val t2p = d3e.styp()
val t2p =
tread33_s2typ(t2p, err)
val ( ) = d3e.styp(t2p)
//
val-
D3Eift0
( d3e1
, dthn, dels) = d3e.node()
//
val
d3e1 = tread33_d3exp(d3e1, err)
val
dthn = tread33_d3expopt(dthn, err)
val
dels = tread33_d3expopt(dels, err)
//
in//let
//
if
(err=e00)
then (d3e) else
(
d3exp_ift0_errck
(d3e.lctn(), t2p, d3e1,dthn,dels) )
//
end (*let*) // end of [ f0_ift0(d3e,err) ]
//
(* ****** ****** *)
//
fun
f0_cas0
( d3e: d3exp
, err: &sint >> _): d3exp =
Expand Down Expand Up @@ -1818,6 +1879,12 @@ tread33_d3explst
(
list_tread33_fnp(d3es, err, tread33_d3exp))
//
#implfun
tread33_d3expopt
( dopt, err ) =
(
optn_tread33_fnp(dopt, err, tread33_d3exp))
//
(* ****** ****** *)
//
#implfun
Expand Down
2 changes: 2 additions & 0 deletions srcgen2/SATS/tread33.sats
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ D3E = "./dynexp3.sats"
(* ****** ****** *)
#typedef d3patlst = $D3E.d3patlst
#typedef d3explst = $D3E.d3explst
#typedef d3expopt = $D3E.d3expopt
(* ****** ****** *)
#typedef f3arglst = $D3E.f3arglst
(* ****** ****** *)
Expand Down Expand Up @@ -153,6 +154,7 @@ fun tread33_t2jaglst: ftread33(t2jaglst)
(* ****** ****** *)
fun tread33_d3patlst: ftread33(d3patlst)
fun tread33_d3explst: ftread33(d3explst)
fun tread33_d3expopt: ftread33(d3expopt)
(* ****** ****** *)
fun tread33_f3arglst: ftread33(f3arglst)
(* ****** ****** *)
Expand Down

0 comments on commit 7b81c80

Please sign in to comment.