[m-dev.] for review: bug fix for typeclass ":-"

Fergus Henderson fjh at cs.mu.oz.au
Wed Jan 14 01:41:56 AEDT 1998


On 13-Jan-1998, David Glen JEFFERY <dgj at cs.mu.oz.au> wrote:
> 
> Can someone please review this? (Fergus?)
> 
>  	mercury_output_pred_decl(VarSet, PredName, TypesAndModes, Det,
> -		Purity, ClassContext, Context, ".\n", ".\n").
> +		Purity, ClassContext, Context, ":-", ".\n", ".\n").

You should pass ":- ", not ":-".
                   ^

(Ditto for lots of other places.)

>  mercury_output_func_type_2(VarSet, FuncName, Types, RetType, MaybeDet, 
> -		Purity, ClassContext, _Context, Separator) -->
> -	io__write_string(":- "),
> +		Purity, ClassContext, _Context, StartString, Separator) -->
> +	io__write_string(StartString),
>  	write_purity_prefix(Purity),
>  	io__write_string("func "),

That's fine...

>  mercury_output_pred_mode_decl_2(VarSet, PredName, Modes, MaybeDet, Context,
> -		Separator) -->
> -	io__write_string(":- mode "),
> +		StartString, Separator) -->
> +	io__write_string(StartString),
> +	io__write_string(" mode "),

No space before "mode ".

>  mercury_output_func_mode_decl_2(VarSet, FuncName, Modes, RetMode, MaybeDet,
> -		Context, Separator) -->
> -	io__write_string(":- mode "),
> +		Context, StartString, Separator) -->
> +	io__write_string(StartString),
> +	io__write_string(" mode "),

Ditto.

-- 
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.



More information about the developers mailing list