From 779a589bdd57cc736d65b6c66f4368a893c86d24 Mon Sep 17 00:00:00 2001
From: sof <unknown>
Date: Thu, 30 Apr 1998 20:01:45 +0000
Subject: [PATCH] [project @ 1998-04-30 20:01:45 by sof] New function: fdToInt

---
 ghc/lib/posix/PosixUtil.lhs | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/ghc/lib/posix/PosixUtil.lhs b/ghc/lib/posix/PosixUtil.lhs
index 047b9bce0ae2..2b3c0d335d84 100644
--- a/ghc/lib/posix/PosixUtil.lhs
+++ b/ghc/lib/posix/PosixUtil.lhs
@@ -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.
-- 
GitLab