On Wed, Sep 17, 2008 at 1:17 PM, Manlio Perillo
[EMAIL PROTECTED] wrote:
The Python tempfile module, as an example, implements a wrapper around
mkstemp function that does exactly this, and the code is portable; on
Windows it uses O_TEMPORARY_FILE flag, on POSIX systems the file is
unlink-ed as
On Wed, Sep 17, 2008 at 02:10:56PM +0100, Dougal Stanton wrote:
On Wed, Sep 17, 2008 at 1:17 PM, Manlio Perillo
[EMAIL PROTECTED] wrote:
The Python tempfile module, as an example, implements a wrapper around
mkstemp function that does exactly this, and the code is portable; on
Windows it
Dougal Stanton ha scritto:
On Wed, Sep 17, 2008 at 1:17 PM, Manlio Perillo
[EMAIL PROTECTED] wrote:
The Python tempfile module, as an example, implements a wrapper around
mkstemp function that does exactly this, and the code is portable; on
Windows it uses O_TEMPORARY_FILE flag, on POSIX
manlio_perillo:
Hi.
After reading the chapter about IO in the Real Word Haskell book, I
have noted that there is no support for opening a temporary file that
will be automatically removed at program termination.
The Python tempfile module, as an example, implements a wrapper around
manlio_perillo:
Dougal Stanton ha scritto:
On Wed, Sep 17, 2008 at 1:17 PM, Manlio Perillo
[EMAIL PROTECTED] wrote:
The Python tempfile module, as an example, implements a wrapper around
mkstemp function that does exactly this, and the code is portable; on
Windows it uses O_TEMPORARY_FILE
But since GHC does not implement such a function, I was curious to
know why it don't even implement a function that make sure the
temporary file is removed.
Because it is two lines to write, so no one has yet proposed
it for the base library.
Map is 2 lines, but we have that as a
On Wed, Sep 17, 2008 at 04:51:07PM +0100, Mitchell, Neil wrote:
But since GHC does not implement such a function, I was curious to
know why it don't even implement a function that make sure the
temporary file is removed.
Because it is two lines to write, so no one has yet
On 2008 Sep 17, at 8:17, Manlio Perillo wrote:
The Python tempfile module, as an example, implements a wrapper
around mkstemp function that does exactly this, and the code is
portable; on Windows it uses O_TEMPORARY_FILE flag, on POSIX systems
the file is unlink-ed as soon as it is created
David Roundy ha scritto:
[...]
In particular, the code Don quoted is incorrect depending on which
import statements are used. If we assume that the default is the
bracket available in Haskell 98, then it is definitely incorrect.
It also doesn't behave properly in the presence of signals or
On Wed, Sep 17, 2008 at 10:11:28PM +0200, Manlio Perillo wrote:
David Roundy ha scritto:
[...]
In particular, the code Don quoted is incorrect depending on which
import statements are used. If we assume that the default is the
bracket available in Haskell 98, then it is definitely incorrect.
10 matches
Mail list logo