[m-rev.] for review: printing streams sensibly in the debugger

Simon Taylor stayl at cs.mu.OZ.AU
Fri Sep 5 01:30:45 AEST 2003


On 04-Sep-2003, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> For anyone to review.
> 
> Print streams sensibly in the debugger.

This looks fine.

Just one thing:

> library/io.m:
> 	Define a user-friendly representation for streams that includes not
> 	just the stream's name but all the info about the stream that user
> 	using mdb may wish to know about the stream, as well as a unique stream
> 	id.

> Index: library/io.m
> ===================================================================
> @@ -61,6 +61,41 @@
>  
>  :- type io__binary_stream.
>  
> +:- type stream_mode	--->	input
> +			;	output
> +			;	append.
> +
> +:- type stream_content	--->	text
> +			;	binary
> +			;	preopen.
> +
> +:- type stream_source	--->	file(string)	% the file name
> +			;	stdin
> +			;	stdout
> +			;	stderr.

Would it be worth adding an `other(string)' alternative to
stream_source to avoid having to change the interface when
we add sockets, named pipes, etc?

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