mkstemp in Haskell

Martin Sjögren md9ms@mdstud.chalmers.se
27 May 2003 00:01:12 +0200


--=-npHbBmQvYHcVvXhlzf3o
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Dear list.

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)

[1]
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/*checkout*/haskell-libs/libs=
/Tempfile.hs

/Martin
PS: I slapped an LGPL license on it, if that's a problem, it's
negotiable.
--=20
Martin Sj=F6gren
  sjogren@debian.org -- marvin@dum.chalmers.se
  GPG key: http://www.mdstud.chalmers.se/~md9ms/gpg.html
  let hello =3D "hello" : hello in putStr (unlines hello)

--=-npHbBmQvYHcVvXhlzf3o
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: Detta =?ISO-8859-1?Q?=E4r?= en digitalt signerad
	meddelandedel

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQA+0o6oGpBPiZwE9FYRAmyNAJ0W6RUQU4Q4QygE9axEEH+2wy4hlACfcZXN
eFOW0LUKtvvgt8FAPqRuL48=
=OH/9
-----END PGP SIGNATURE-----

--=-npHbBmQvYHcVvXhlzf3o--