{-# LINE 1 "libraries/libiserv/src/GHCi/Utils.hsc" #-}
{-# LANGUAGE CPP #-}
module GHCi.Utils
    ( getGhcHandle
    ) where

import Foreign.C
import GHC.IO.Handle (Handle())

import System.Posix




-- | Gets a GHC Handle File description from the given OS Handle or POSIX fd.
getGhcHandle :: CInt -> IO Handle

getGhcHandle fd     = fdToHandle $ Fd fd