[m-rev.] For review: State Variables

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Jun 6 16:55:43 AEST 2002


On 06-Jun-2002, Ralph Becket <rafe at cs.mu.OZ.AU> wrote:
> diff -u make_hlds.m make_hlds.m
> --- make_hlds.m	2 May 2002 03:54:54 -0000
> +++ make_hlds.m	6 Jun 2002 03:26:37 -0000
> @@ -16,6 +16,9 @@
>  % super-homogenous form, and introduce implicit quantification.
>  % 
>  % XXX we should record each error using module_info_incr_errors.
> +%
> +% XXX For state variables, we should allow quantifiers around if-then-else
> +% expressions.
>  
>  % WISHLIST - we should handle explicit module quantification
>  
> @@ -117,7 +120,7 @@
>  :- import_module libs__options, libs__globals.
>  
>  :- import_module string, char, int, set, bintree, map, multi_map, require.
> -:- import_module bag, term, varset, getopt, assoc_list, term_io, counter.
> +:- import_module bag, term, varset, getopt, assoc_list, term_io.
>  
>  parse_tree_to_hlds(module(Name, Items), MQInfo0, EqvMap, Module, QualInfo,
>  		UndefTypes, UndefModes) -->
> @@ -409,9 +412,6 @@
>  		{ Pragma = foreign_proc(_, _, _, _, _, _) },
>  		{ Module = Module0 }
>  	;	
> -		% Note that we check during add_item_clause that we have
> -		% defined a foreign_type which is usable by the back-end
> -		% we are compiling on.
>  		{ Pragma = foreign_type(ForeignType, _MercuryType, Name) },
>  
>  		{ varset__init(VarSet) },

It looks like you have not properly merged in Pete's foreign_type
changes here.

> @@ -566,11 +566,11 @@
>  		add_pred_marker(Module0, "promise_semipure", Name, Arity,
>  			ImportStatus, Context, promised_semipure, [], Module)
>  	;
> -		% Handle pragma termination_info decls later on, in pass 3 --
> -		% we need to add function default modes before handling
> -		% these pragmas
> -		{ Pragma = termination_info(_, _, _, _, _) },
> -		{ Module = Module0 }
> +		{ Pragma = termination_info(PredOrFunc, SymName, ModeList, 
> +			MaybeArgSizeInfo, MaybeTerminationInfo) },
> +		add_pragma_termination_info(PredOrFunc, SymName, ModeList,
> +			MaybeArgSizeInfo, MaybeTerminationInfo, Context,
> +			Module0, Module)
>  	;
>  		{ Pragma = terminates(Name, Arity) },
>  		add_pred_marker(Module0, "terminates", Name, Arity,

Likewise.

> @@ -804,25 +804,10 @@
>  		add_pragma_type_spec(Pragma, Context, Module0, Module,
>  			Info0, Info)
>  	;
> - 		{ Pragma = termination_info(PredOrFunc, SymName, ModeList, 
> - 			MaybeArgSizeInfo, MaybeTerminationInfo) }
> - 	->
> - 		add_pragma_termination_info(PredOrFunc, SymName, ModeList,
> - 			MaybeArgSizeInfo, MaybeTerminationInfo, Context,
> - 			Module0, Module),
> - 		{ Info = Info0 }
> - 	;
> -		{ Pragma = foreign_type(_, _, Name) }
> -	->
> -		check_foreign_type(Name, Context, Module0, Module),
> +		% don't worry about any pragma decs but c_code, tabling,
> +		% type_spec and fact_table here
> +		{ Module = Module0 },
>  		{ Info = Info0 }	
> -	;
> - 		% don't worry about any pragma declarations other than the
> - 		% clause-like pragmas (c_code, tabling and fact_table),
> -		% foreign_type and the termination_info pragma here,
> -		% since they've already been handled earlier, in pass 2
> -  		{ Module = Module0 },
> -  		{ Info = Info0 }	
>  	).
>  	
>  add_item_clause(promise(PromiseType, Goal, VarSet, UnivVars),

Likewise.

etc.

You will need to go through this file and fix the merge errors.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list