mkstemp in Haskell
Martin Norbäck
d95mback@dtek.chalmers.se
27 May 2003 10:42:28 +0200
tis 2003-05-27 klockan 09.20 skrev Volker Stolz:
> In local.libraries, you wrote:
> > I needed a function for creating temporary files. Since I couldn't find
> > one in the standard library, I just hacked one up using the ffi. It's in
> > the haskell-libs cvs [1]. I've got an icky import of GHC.Handle to get
> > openFd, any way I could get rid of it? (fdToHandle isn't enough)
>
> It's in the Posix Spec, so we might as well put it in System.Posix.
Yes, and perhaps you want to return (String, Handle) so that you know
the file name (in case you want to do something else than just
reading/writing from it).
Oh, and on an almost but not completely unrelated note, why not use the
hierarchical namespace for all the other haskell-libs projects as well?
I just put some code into haskell-i18n
(http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/haskell-i18n/Source/Text/I18N/) maybe we should use the same repository?
Regards,
Martin
--
Martin Norbäck d95mback@dtek.chalmers.se
Kapplandsgatan 40 +46 (0)708 26 33 60
S-414 78 GÖTEBORG http://www.dtek.chalmers.se/~d95mback/
SWEDEN OpenPGP ID: 3FA8580B