-- | This module contains code which (supposedly) extracts the full qualified -- name of the machine on which it is running. (At least it does on the -- Linux and Solaris implementations I tested.) module Util.HostName( getFullHostName, ) where import Network.BSD getFullHostName :: IO String getFullHostName :: IO String getFullHostName = do String partialName <- IO String getHostName HostEntry hostEntry <- String -> IO HostEntry getHostByName String partialName String -> IO String forall (m :: * -> *) a. Monad m => a -> m a return (HostEntry -> String hostName HostEntry hostEntry)