[m-rev.] diff: fix par_builtin compilation in erlang grade

Peter Wang novalazy at gmail.com
Wed Oct 26 17:51:20 AEDT 2011


Branches: main

Fix standard library compilation in erlang grades.

library/par_builtin.m:
	Add stubs for lc_finish and lc_wait_free_slot.

diff --git a/library/par_builtin.m b/library/par_builtin.m
index dc6f62f..6c2b1a5 100644
--- a/library/par_builtin.m
+++ b/library/par_builtin.m
@@ -532,4 +532,15 @@ mercury_sys_init_lc_write_out_proc_statics(FILE *deep_fp,
 ").
 
 %-----------------------------------------------------------------------------%
+
+:- pragma foreign_code("Erlang",
+"
+lc_finish_1_p_0(_) ->
+    throw(""lc_finish is unavailable in this grade"").
+
+lc_wait_free_slot_2_p_0(_) ->
+    throw(""lc_wait_free_slot is unavailable in this grade"").
+").
+
+%-----------------------------------------------------------------------------%
 %-----------------------------------------------------------------------------%

--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list