It looks like it's in IO now, so I added an IORef to keep track of what files 
we've
seen and truncate on the first write.  I'll push the change soon.

Cheers,
Edward

Excerpts from Ben Lippmeier's message of Sun May 15 04:35:31 -0400 2011:
> 
> On 14/05/2011, at 11:16 PM, Edward Z. Yang wrote:
> 
> > Currently, -ddump-to-file appends to an existing file.  This is pretty 
> > confusing
> > for me, if I wanted to get a new set of information, because now I have to 
> > delete
> > any dump files before I take more data, or I need to manually separate out 
> > the
> > runs (which, by the way, are not demarcated.)
> > 
> > If no one else objects, I'll flip this to overwriting previous files, much 
> > the
> > same way other things we dump to files work.
> 
> 
> I added the -ddump-to-file flag a few years ago, but I remember having 
> trouble finding a place to delete any existing dump file. My recollection is 
> that some of the --dump-to-file functionality is an unsafePerformIO'd hook on 
> the pretty printer, so there were sequencing issues when writing out the 
> files. I agree it'd be nicer to have separate files, but at the time I 
> couldn't work a simple, clean way of implementing them.
> 
> Ben.

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to