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 Oct 26, 2023
1 parent 41f85cd commit 84ee397
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 1 deletion.
45 changes: 44 additions & 1 deletion prelude/DATS/gint000.dats
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,49 @@ gint_consq_uint<>(xs) = (xs >= 1u)
*)
//
(* ****** ****** *)
//
#impltmp
<r0:vwtp>
gint_foldl_sint
(xs , r0) =
loop(x0, r0) where
{
//
val x0 = 0
//
#typedef x0 = sint
//
fun
loop(x0: x0, r0: r0): r0 =
if
x0 >= xs then r0 else
loop(x0+1, foldl$fopr<x0><r0>(r0, x0))
//
} (*where*) // end-of-[gint_foldl_sint]
//
(* ****** ****** *)
//
#impltmp
<r0:vwtp>
gint_foldr_sint
(xs , r0) =
loop(x0, r0) where
{
//
val x0 = xs
//
#typedef x0 = sint
//
fun
loop(x0: x0, r0: r0): r0 =
if
(x0 <= 0) then r0 else
(loop
(x0-1, foldr$fopr<x0><r0>(x0-1, r0)))
//
} (*where*) // end-of-[gint_foldr_sint]
//
(* ****** ****** *)

#impltmp
gint_forall_sint<>
Expand Down Expand Up @@ -250,7 +293,7 @@ end // end of [gint_rlistize_nint]
(* ****** ****** *)

#impltmp
<y0:vt>
<y0:vwtp>
gint_map_llist_nint
{n}(xs) = let
//
Expand Down
2 changes: 2 additions & 0 deletions srcgen2/DATS/tread33.dats
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,10 @@ d3parsed_get_parsed(dpar)
val parsed =
tread33_d3eclistopt(parsed, nerror)
//
(*
val ( ) = prerrln
("d3parsed_of_tread33: t3penv = ", t3penv)
*)
//
in//let
//
Expand Down

0 comments on commit 84ee397

Please sign in to comment.