[m-dev.] For review: Incorporate the term brower stuff in the external debugger. [part 1/2]

Fergus Henderson fjh at cs.mu.OZ.AU
Fri May 21 08:23:46 AEST 1999


On 20-May-1999, Erwan Jahier <Erwan.Jahier at irisa.fr> wrote:
> Incorporate the term brower stuff in the external debugger.
...
> +%---------------------------------------------------------------------------%
> +% If the term browser is called from the internal debugger, Input/Output are 
> +% done via MR_mdb_in/MR_mdb_out. If it is called from the external debugger,
> +% Input/Output are done via MR_debugger_socket_in/MR_debugger_socket_out. 
> +% Hence we need to output terms ; their type is term_browser_response.

s/Hence/In the latter case, /
s/ ;/;/

> -:- pred help(io__state::di, io__state::uo) is det.
> -help -->
> +:- pred help(debugger::in, io__state::di, io__state::uo) is det.
> +help(internal) -->
>  	io__write_string(
>  "Commands are:\n\
>  \tls [path]      -- list subterm (expanded)\n\
> @@ -277,66 +343,90 @@
>  \n"
>  	).
>  
> +help(external) -->
> +	write_string_debugger(external, 
> +"Commands are:\n\
> +\t'ls [path]'.      -- list subterm (expanded)\n\
> +\t'cd [path]'.      -- cd current subterm (default is root)\n\
> +\thelp.             -- show this help message\n\
> +\t'set var value'.  -- set a setting\n\
> +\tset.              -- show settings\n\
> +\tprint.            -- show single line representation of current term\n\
> +\tquit.             -- quit browser\n\
> +SICStus Prolog style commands are:\n\
> +\tp.                -- print\n\
> +\t'< [n]'.          -- set depth (default is 10)\n\
> +\t'^ [path]'.       -- cd [path]\n\
> +\t'?'.              -- help\n\
> +\th.                -- help\n\
> +\n\
> +-- settings:\n\
> +--    size; depth; path; format (flat pretty verbose); clipx; clipy\n\
> +--    Paths can be Unix-style or SICStus-style: /2/3/1 or ^2^3^1\n\
> +\n"
> +	).

Why did you duplicate the help string here?
Why not just use `help(Debugger) :- write_string_debugger(Debugger, "...")'
to handle both cases?

-- 
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.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list