for review: make `.opt' files more readable

Tyson Dowd trd at cs.mu.OZ.AU
Sat Jan 24 21:20:52 AEDT 1998


On 24-Jan-1998, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> 
> Estimated hours taken: 0.75
> 
> Make the generated `.opt' and `.trans_opt' files a little bit more readable.
> 
> compiler/mercury_to_mercury.m:
> 	When printing out strings for `pragma c_code' 
> 	and `pragma c_header_code', print out literal tabs
> 	and newlines, rather than \t and \n.
> 
> library/term_io.m:
> 	Add some comments warning that changes here may require
> 	corresponding changes to similar code in mercury_to_mercury.m.

I'm not completely convinced that having more readable .opt and
.trans_opt files is worth introducing a double maintenance problem.
But it's fairly unlikely there will be much maintenance, so it's ok.

> +
> +:- pred mercury_write_escaped_string(string::in, io__state::di, io__state::uo)
> +	is det.

write_escaped_string?
Well, it's not very escaped. But in the interested of making it
easy to update both copies, it's probably best to retain this name.

The change is fine.

-- 
       Tyson Dowd           # 
                            #  Surreal humour isn't eveyone's cup of
     trd at cs.mu.oz.au        #  fur.
http://www.cs.mu.oz.au/~trd #



More information about the developers mailing list