Re: Feature, implement :main command

Ross Paterson <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.hugs
Message-ID <20051030200508.GC14070__37597.8001197383$1130702831$gmane$org@soi.city.ac.uk>
On Sun, Oct 30, 2005 at 07:59:16PM +0000, Neil Mitchell wrote:
> > This differs from setArgs in that it leave the args set.  Maybe the
> > command should just set the args.
> 
> From what I can tell, setArgs leaves the arguments set, but withArgs
> doesn't because with changes the arguments back after the computation
> has run. My initial thought was to revert the arguments back
> afterwards, but it wasn't immediately clear how to do this - because
> of things like longjmp.

Sorry, I meant withArgs -- setArgs is internal.  But instead of resetting,
how about making setting the args the whole function of the new command,
so then they can run main (or anything else) several times with the same
argument?  (I'm not sure what WinHugs interface you had in mind.)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.