[project @ 1998-04-30 20:01:45 by sof]
authorsof <unknown>
Thu, 30 Apr 1998 20:01:45 +0000 (20:01 +0000)
committersof <unknown>
Thu, 30 Apr 1998 20:01:45 +0000 (20:01 +0000)
New function: fdToInt

ghc/lib/posix/PosixUtil.lhs

index 047b9bc..2b3c0d3 100644 (file)
@@ -43,6 +43,9 @@ instance Eq Fd where
 -- use with care.
 intToFd :: Int -> Fd
 intToFd (I# fd#) = FD# fd#
+
+fdToInt :: Fd -> Int
+fdToInt (FD# x#) = I# x#
 \end{code}
 
 Now some local functions that shouldn't go outside this library.