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 Jan 26, 2025
1 parent 01cc4b8 commit d527b7e
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 7 deletions.
3 changes: 3 additions & 0 deletions srcgen2/DATS/preadx0_dynexp.dats
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ ATS_PACKNAME
#symload lctn with token_get_lctn
#symload node with token_get_node
(* ****** ****** *)
#symload lctn with l0abl_get_lctn
#symload node with l0abl_get_node
(* ****** ****** *)
#symload lctn with sort0_get_lctn
#symload node with sort0_get_node
(* ****** ****** *)
Expand Down
3 changes: 3 additions & 0 deletions srcgen2/DATS/preadx0_errmsg.dats
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ ATS_PACKNAME
#symload lctn with token_get_lctn
#symload node with token_get_node
(* ****** ****** *)
#symload lctn with i0dnt_get_lctn
#symload node with i0dnt_get_node
(* ****** ****** *)
#symload lctn with l0abl_get_lctn
#symload node with l0abl_get_node
(* ****** ****** *)
Expand Down
38 changes: 31 additions & 7 deletions srcgen2/DATS/trans12_dynexp.dats
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ my_d2pat_sapp
, d2f0: d2pat
, s2vs: s2varlst): d2pat =
(
case-
case+
d2f0.node() of
|
D2Pdap0(d2f0) =>
Expand All @@ -255,7 +255,7 @@ d2pat_sapp(loc0, d2f0, s2vs))
_ (* non-D2Pdap0 *) =>
(
d2pat_sapp(loc0, d2f0, s2vs))
) (*case-*) // end of [my_d2pat_sapp]
) (*case+*) // end of [my_d2pat_sapp]
//
(* ****** ****** *)
//
Expand Down Expand Up @@ -366,7 +366,7 @@ my_d2exp_sapp
, d2f0: d2exp
, s2es: s2explst): d2exp =
(
case-
case+
d2f0.node() of
|
D2Edap0(d2f0) =>
Expand All @@ -377,7 +377,7 @@ d2exp_sapp(loc0, d2f0, s2es)
|
_(* non-D2Edap0 *) =>
d2exp_sapp(loc0, d2f0, s2es)
) (*case-*) // end-of-[my_d2exp_sapp]
) (*case+*) // end-of-[my_d2exp_sapp]
//
(* ****** ****** *)
//
Expand All @@ -387,7 +387,7 @@ my_d2exp_tapp
, d2f0: d2exp
, s2es: s2explst): d2exp =
(
case-
case+
d2f0.node() of
|
D2Edap0(d2f0) =>
Expand All @@ -398,7 +398,7 @@ d2exp_tapp(loc0, d2f0, s2es)
|
_ (* non-D2Edap0 *) =>
d2exp_tapp(loc0, d2f0, s2es)
) (*case-*) // end-of-[my_d2exp_tapp]
) (*case+*) // end-of-[my_d2exp_tapp]
//
(* ****** ****** *)
//
Expand Down Expand Up @@ -1137,15 +1137,39 @@ D1Pa2pp
( d1f0
, d1p1, d1p2) = d1p0.node()
//
(*
val () =
(
prerrsln("\
trans12_d1pat:\
f0_a2pp: d1f0 = ", d1f0))//val()
*)
//
val
d2f0 = trans12_d1pat(env0, d1f0)
//
(*
val () =
(
prerrsln("\
trans12_d1pat:\
f0_a2pp: d2f0 = ", d2f0))//val()
*)
//
val
d2p1 = trans12_d1pat(env0, d1p1)
val
d2p2 = trans12_d1pat(env0, d1p2)
//
in//let
d2pat_a2pp(loc0, d2f0, d2p1, d2p2)
//
let
val npf1 = (-1)
val d2ps = list_pair(d2p1, d2p2)
in//let
my_d2pat_dapp(loc0, d2f0, npf1, d2ps)
end//let
//
end (*let*) // end of [f0_a2pp(env0,d1p0)]
//
(* ****** ****** *)
Expand Down
12 changes: 12 additions & 0 deletions srcgen2/UTIL/TEST/test01_mydebug.dats
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,18 @@ case+ x of A => 0 | B _ => 1 // | C() => 2
(* ****** ****** *)
(* ****** ****** *)
//
#define :: list_cons
//
fun
list_length(xs: list(sint)): nint =
(
case+ xs of
| list_nil() => 0
| ( _ :: xs ) => 1 + list_length(xs)
)
(* ****** ****** *)
(* ****** ****** *)
//
(* ****** ****** *)(* ****** ****** *)(* ****** ****** *)
(* ****** ****** *)(* ****** ****** *)(* ****** ****** *)

Expand Down

0 comments on commit d527b7e

Please sign in to comment.