[m-dev.] trivial diff: delete some old bootstrapping code

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Oct 18 21:13:13 AEST 1999


Estimated hours taken: 0.25

library/term.m:
library/std_util.m:
	Delete some old bootstrapping code.

Workspace: /d-drive/home/hg/fjh/mercury
Index: library/std_util.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/std_util.m,v
retrieving revision 1.162
diff -u -r1.162 std_util.m
--- library/std_util.m	1999/10/13 07:01:29	1.162
+++ library/std_util.m	1999/10/18 11:09:06
@@ -1375,12 +1375,8 @@
 	( Arity = 0 ->
 		UnqualifiedTypeName = Name
 	;
-		% XXX the test for mercury_builtin is for bootstrapping
-		% only; it should eventually be deleted.
-		( ModuleName = "mercury_builtin", Name = "func" -> 
+		( ModuleName = "builtin", Name = "func" -> 
 			IsFunc = yes 
-		; ModuleName = "builtin", Name = "func" -> 
-			IsFunc = yes 
 		;
 		 	IsFunc = no 
 		),
@@ -1398,9 +1394,7 @@
 				UnqualifiedTypeName)
 		)
 	),
-		% XXX the test for mercury_builtin is for bootstrapping
-		% only; it should eventually be deleted.
-	( (ModuleName = "mercury_builtin" ; ModuleName = "builtin") ->
+	( ModuleName = "builtin" ->
 		TypeName = UnqualifiedTypeName
 	;
 		string__append_list([ModuleName, ":", 
Index: library/term.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/term.m,v
retrieving revision 1.89
diff -u -r1.89 term.m
--- library/term.m	1999/03/15 08:48:11	1.89
+++ library/term.m	1999/10/18 11:07:14
@@ -423,27 +423,6 @@
 		term(T)::in(bound(term__functor(ground, ground, ground))),
 		type_info::in, term_to_type_context::in,
 		term_to_type_result(univ, T)::out) is semidet.
-/*
-** XXX the following clauses for mercury_builtin:* are
-** for bootstrapping only, and should eventually be deleted
-*/
-term__term_to_univ_special_case("mercury_builtin", "character", [],
-		Term, _, _, ok(Univ)) :-
-	Term = term__functor(term__atom(FunctorName), [], _),
-	string__first_char(FunctorName, Char, ""),
-	type_to_univ(Char, Univ).
-term__term_to_univ_special_case("mercury_builtin", "int", [],
-		Term, _, _, ok(Univ)) :-
-	Term = term__functor(term__integer(Int), [], _),
-	type_to_univ(Int, Univ).
-term__term_to_univ_special_case("mercury_builtin", "string", [],
-		Term, _, _, ok(Univ)) :-
-	Term = term__functor(term__string(String), [], _),
-	type_to_univ(String, Univ).
-term__term_to_univ_special_case("mercury_builtin", "float", [],
-		Term, _, _, ok(Univ)) :-
-	Term = term__functor(term__float(Float), [], _),
-	type_to_univ(Float, Univ).
 
 term__term_to_univ_special_case("builtin", "character", [],
 		Term, _, _, ok(Univ)) :-
@@ -601,24 +580,6 @@
 		list(type_info)::in, univ::in, term__context::in,
 		term(T)::out) is semidet.
 
-/*
-** XXX the following clauses for mercury_builtin:* are
-** for bootstrapping only, and should eventually be deleted
-*/
-term__univ_to_term_special_case("mercury_builtin", "int", [], Univ, Context,
-		term__functor(term__integer(Int), [], Context)) :-
-	det_univ_to_type(Univ, Int).
-term__univ_to_term_special_case("mercury_builtin", "float", [], Univ, Context,
-		term__functor(term__float(Float), [], Context)) :-
-	det_univ_to_type(Univ, Float).
-term__univ_to_term_special_case("mercury_builtin", "character", [], Univ, 
-		Context, term__functor(term__atom(CharName), [], Context)) :-
-	det_univ_to_type(Univ, Character),
-	string__char_to_string(Character, CharName).
-term__univ_to_term_special_case("mercury_builtin", "string", [], Univ, Context,
-		term__functor(term__string(String), [], Context)) :-
-	det_univ_to_type(Univ, String).
-
 term__univ_to_term_special_case("builtin", "int", [], Univ, Context,
 		term__functor(term__integer(Int), [], Context)) :-
 	det_univ_to_type(Univ, Int).
@@ -676,11 +637,7 @@
 	ModuleName = type_ctor_name(TypeCtor),
 	list__map(type_info_to_term(Context), ArgTypes, ArgTerms),
 
-	/*
-	** XXX the test for mercury_builtin is for bootstrapping only,
-	** and should eventually be deleted
-	*/
-	( (ModuleName = "mercury_builtin" ; ModuleName = "builtin") ->
+	( ModuleName = "builtin" ->
 		Term = term__functor(term__atom(TypeName), ArgTerms, Context)
 	;
 		Term = term__functor(term__atom(":"),

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list