[m-rev.] diff: add wrapper type to ease hlds->hlds transformations

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Apr 5 03:20:57 AEST 2001


On 05-Apr-2001, Adrian Pellas-Rice <apell at students.cs.mu.oz.au> wrote:
> 
> compiler/hlds_goal.m
> 	Create a new type, the `shorthand_goal_expr', for goals kinds that
> 	are implemented by a (ordinary_hlds + shorthand) -> (ordinary_hlds)
> 	transformation.  At present, bi_implication is the only kind of
> 	of goal that is implemented in this way.
> 
> 	Moved bi_implication functor from the type goal_expr to the new
> 	shorthand_goal_expr type.  
> 
> 	Added the functor shorthand to the goal_expr type.
> 
> compiler/*.m
> 	Change switches on hlds_goal_expr that call error when they recognise
> 	`bi_implication' from calling error when they recognise
> 	`bi_implication' to calling error when they recognise `shorthand'.
> 
> 	For all predicates K that 
> 		a) switch on hlds_goal_expr and 
> 		b) perform non-trivial processing when they recognise
> 		   `bi_implication' 
> 	change K such that it now calls K_shorthand upon recognising the
> 	functor `shorthand'. Define K_shorthand to switch on
> 	shorthand_goal_expr, where the code for the `bi_implication' case
> 	formerly contained in K is now contained in K_shorthand. 

That looks fine.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  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