Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updating: tidying up some code.

  • Loading branch information...
commit 9429b73362e020f310a7783182c8b373ea8cea97 1 parent 515fd2c
Hongwei Xi authored
1  doc/EXAMPLE/GTK/gtkcairoclock.dats
View
@@ -263,6 +263,7 @@ fun sec_changed
prval () = opt_unsome {tm_struct} (tm)
val sd = tm.tm_sec
val sd_old = !theLastSec
+ val () = !theLastSec := sd
in
sd <> sd_old
end // end of [sec_changed]
2  libats/SATS/linordset_randbst.sats
View
@@ -116,9 +116,11 @@ viewtypedef rngobj = rngobj_viewtype
fun linordset_rngobj_make_drand48
():<> rngobj = "atslib_linordset_rngobj_make_drand48"
+// end of [linordset_rngobj_make_drand48]
fun linordset_rngobj_free
(obj: rngobj):<> void = "atslib_linordset_rngobj_free"
+// end of [linordset_rngobj_free]
(* ****** ****** *)
16 src/ats_trans3_deref.dats
View
@@ -53,11 +53,13 @@ staload "ats_trans3.sats"
(* ****** ****** *)
-overload prerr with $Loc.prerr_location
+macdef prerr_location = $Loc.prerr_location
(* ****** ****** *)
-implement s2exp_addr_deref_slablst (loc0, s2e0, s2ls) = let
+implement
+s2exp_addr_deref_slablst
+ (loc0, s2e0, s2ls) = let
val @(s2r0, s2ls0_ft) = s2exp_addr_normalize s2e0
val s2ls = $Lst.list_append (s2ls0_ft, s2ls)
in
@@ -97,14 +99,16 @@ in
(s2e_elt, s2ls0_bk)
end // end of [Some_vt]
| ~None_vt () => let
- fun aux (s2ls: s2lablst): void = begin
+ fun aux (
+ s2ls: s2lablst
+ ) : void = begin
case+ s2ls of
- | list_cons (s2l, s2ls) => (prerr "."; prerr_s2lab s2l; aux s2ls)
+ | list_cons (s2l, s2ls) =>
+ (prerr "."; prerr_s2lab s2l; aux s2ls)
| list_nil () => ()
end // end of [aux]
in
- prerr loc0;
- prerr ": error(3)";
+ prerr_location loc0; prerr ": error(3)";
prerr ": there is no view at ["; prerr s2r0; aux s2ls; prerr "]";
prerr_newline ();
$Err.abort ()
23 src/ats_trans3_exp_up.dats
View
@@ -918,7 +918,9 @@ in
) => begin
case+ d2ess_ind of
| cons (d2es_ind, nil ()) => let
- val loc_arg = $Loc.location_combine (d2e_arr.d2exp_loc, d2e_r.d2exp_loc)
+ val loc_arg =
+ $Loc.location_combine (d2e_arr.d2exp_loc, d2e_r.d2exp_loc)
+ // end of [val]
val d2es_arg = cons (d2e_arr, $Lst.list_extend (d2es_ind, d2e_r))
val d2a = D2EXPARGdyn (loc_arg, 0, d2es_arg)
in
@@ -1127,12 +1129,12 @@ in
val () = the_effect_env_check_ref
(loc0) // HX: read from a reference is effectful
val () = if s2exp_is_linear s2e_elt then let // linearity checking
- val () = prerr_loc_error3 (d2e0.d2exp_loc)
- val () = prerr ": a reference to a linear value cannot be accessed directly."
- val () = prerr_newline ()
- in
- $Err.abort {void} ()
- end // end of [if]
+ val () = prerr_loc_error3 (d2e0.d2exp_loc)
+ val () = prerr ": a reference to a linear value cannot be accessed directly."
+ val () = prerr_newline ()
+ in
+ $Err.abort {void} ()
+ end // end of [if]
in
d3exp_sel_ptr (loc0, s2e_elt, d3e0, nil ())
end // end of [Some_vt]
@@ -2048,7 +2050,8 @@ val d3e0 = (case+ d2e0.d2exp_node of
d2exp_apps_tr_up (d3e_fun, d2as_arg)
end // end of [_]
end // end of [D2Eapps]
- | D2Earrsize (os2e_elt, d2es_elt) => let
+ | D2Earrsize
+ (os2e_elt, d2es_elt) => let
val sz = $Lst.list_length d2es_elt
val s2e_elt = (case+ os2e_elt of
| Some s2e => s2e | None () => let
@@ -2062,7 +2065,9 @@ val d3e0 = (case+ d2e0.d2exp_node of
in
d3exp_arrsize (loc0, s2e_arrsz, s2e_elt, d3es_elt)
end // end of [D2Earrsize]
- | D2Earrsub (d2s_brackets, d2e_arr, loc_ind, d2ess_ind) => begin
+ | D2Earrsub (
+ d2s_brackets, d2e_arr, loc_ind, d2ess_ind
+ ) => begin
if d2exp_var_cst_is_ptr d2e_arr then let
val d2l = d2lab_ind (loc_ind, d2ess_ind)
in
6 utils/atsdoc/DOCUMENT/atslangweb/atslangweb_temp.atxt
View
@@ -217,7 +217,11 @@ padding-top: 6px ;
<table>
<tr>
<td style="width: 100%;">
-This page is maintained by
+This page is created with
+#ulink("http://www.ats-lang.org", "ATS")
+by
+#ulink("http://www.cs.bu.edu/~hwxi/", "Hongwei Xi")
+and also maintained by
#ulink("http://www.cs.bu.edu/~hwxi/", "Hongwei Xi").
</td>
<td style="width: 0%;"><!--pushed to the right-->
10 utils/scripts/atspack.dats
View
@@ -1116,16 +1116,6 @@ fn Anairiats_contrib_dir_copy
val () = libdir_copy (SRCROOTcontrib_GL, DSTROOTcontrib_GL)
} // end of [where]
//
- val () = () where { // API for GLES2: [contrib/GLES2]
- val SRCROOTcontrib_GLES2 = SRCROOTcontrib ++ "GLES2/"
- val DSTROOTcontrib_GLES2 = DSTROOTcontrib ++ "GLES2/"
- val () = mkdir_exn (DSTROOTcontrib_GLES2, DIRmode)
- val () = fcopy_exn (
- SRCROOTcontrib_GLES2++"Makefile", DSTROOTcontrib_GLES2++"Makefile"
- ) // end of [val]
- val () = libdir_copy (SRCROOTcontrib_GLES2, DSTROOTcontrib_GLES2)
- } // end of [where]
-//
val () = () where { // API for SDL: [contrib/SDL]
val SRCROOTcontrib_SDL = SRCROOTcontrib ++ "SDL/"
val DSTROOTcontrib_SDL = DSTROOTcontrib ++ "SDL/"
Please sign in to comment.
Something went wrong with that request. Please try again.