diff options
author | Herbert Valerio Riedel <hvr@gnu.org> | 2013-09-15 10:58:00 +0200 |
---|---|---|
committer | Herbert Valerio Riedel <hvr@gnu.org> | 2013-09-17 09:47:55 +0200 |
commit | 43ece172e7045d5ba633be6193f3e908eaa81f00 (patch) | |
tree | f1e25c06b710a5087173daf5eb01b94ab8517917 /libraries/base/System | |
parent | 907cd8c36b6c249dcb8af19f05303e34eb4e8de4 (diff) | |
download | haskell-43ece172e7045d5ba633be6193f3e908eaa81f00.tar.gz |
Remove Hugs98 specific code
For rationale. see
http://permalink.gmane.org/gmane.comp.lang.haskell.ghc.devel/2349
Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
Diffstat (limited to 'libraries/base/System')
-rw-r--r-- | libraries/base/System/CPUTime.hsc | 4 | ||||
-rw-r--r-- | libraries/base/System/Environment.hs | 4 | ||||
-rw-r--r-- | libraries/base/System/Exit.hs | 5 | ||||
-rw-r--r-- | libraries/base/System/IO.hs | 21 | ||||
-rw-r--r-- | libraries/base/System/IO/Error.hs | 11 | ||||
-rw-r--r-- | libraries/base/System/IO/Unsafe.hs | 5 | ||||
-rw-r--r-- | libraries/base/System/Info.hs | 7 | ||||
-rw-r--r-- | libraries/base/System/Mem.hs | 4 | ||||
-rw-r--r-- | libraries/base/System/Mem/StableName.hs | 4 | ||||
-rw-r--r-- | libraries/base/System/Mem/Weak.hs | 5 | ||||
-rw-r--r-- | libraries/base/System/Posix/Internals.hs | 8 |
11 files changed, 2 insertions, 76 deletions
diff --git a/libraries/base/System/CPUTime.hsc b/libraries/base/System/CPUTime.hsc index ec0d792eda..ab8f86ccd6 100644 --- a/libraries/base/System/CPUTime.hsc +++ b/libraries/base/System/CPUTime.hsc @@ -28,10 +28,6 @@ import Prelude import Data.Ratio -#ifdef __HUGS__ -import Hugs.Time ( getCPUTime, clockTicks ) -#endif - #ifdef __GLASGOW_HASKELL__ import Foreign.Safe import Foreign.C diff --git a/libraries/base/System/Environment.hs b/libraries/base/System/Environment.hs index d99d960289..25aa6f4ab7 100644 --- a/libraries/base/System/Environment.hs +++ b/libraries/base/System/Environment.hs @@ -52,10 +52,6 @@ import System.Posix.Internals (withFilePath) #endif #endif -#ifdef __HUGS__ -import Hugs.System -#endif - import System.Environment.ExecutablePath #ifdef mingw32_HOST_OS diff --git a/libraries/base/System/Exit.hs b/libraries/base/System/Exit.hs index 1b5b80815e..dbe2ce0ce0 100644 --- a/libraries/base/System/Exit.hs +++ b/libraries/base/System/Exit.hs @@ -30,11 +30,6 @@ import GHC.IO import GHC.IO.Exception #endif -#ifdef __HUGS__ -import Hugs.Prelude (ExitCode(..)) -import Control.Exception.Base -#endif - -- --------------------------------------------------------------------------- -- exitWith diff --git a/libraries/base/System/IO.hs b/libraries/base/System/IO.hs index 616884a9e6..d6ed1f52e5 100644 --- a/libraries/base/System/IO.hs +++ b/libraries/base/System/IO.hs @@ -105,7 +105,7 @@ module System.IO ( hIsReadable, hIsWritable, hIsSeekable, - -- ** Terminal operations (not portable: GHC\/Hugs only) + -- ** Terminal operations (not portable: GHC only) hIsTerminalDevice, @@ -158,11 +158,9 @@ module System.IO ( hSetBinaryMode, hPutBuf, hGetBuf, -#if !defined(__HUGS__) hGetBufSome, hPutBufNonBlocking, hGetBufNonBlocking, -#endif -- * Temporary files @@ -171,7 +169,6 @@ module System.IO ( openTempFileWithDefaultPermissions, openBinaryTempFileWithDefaultPermissions, -#if !defined(__HUGS__) -- * Unicode encoding\/decoding -- | A text-mode 'Handle' has an associated 'TextEncoding', which @@ -201,9 +198,7 @@ module System.IO ( localeEncoding, char8, mkTextEncoding, -#endif -#if !defined(__HUGS__) -- * Newline conversion -- | In Haskell, a newline is always represented by the character @@ -227,7 +222,6 @@ module System.IO ( Newline(..), nativeNewline, NewlineMode(..), noNewlineTranslation, universalNewlineMode, nativeNewlineMode, -#endif ) where import Control.Exception.Base @@ -259,13 +253,6 @@ import GHC.Show import GHC.MVar #endif -#ifdef __HUGS__ -import Hugs.IO -import Hugs.IOExts -import Hugs.IORef -import System.IO.Unsafe ( unsafeInterleaveIO ) -#endif - -- ----------------------------------------------------------------------------- -- Standard IO @@ -421,7 +408,7 @@ withBinaryFile name mode = bracket (openBinaryFile name mode) hClose -- --------------------------------------------------------------------------- -- fixIO -#if defined(__GLASGOW_HASKELL__) || defined(__HUGS__) +#if defined(__GLASGOW_HASKELL__) fixIO :: (a -> IO a) -> IO a fixIO k = do m <- newEmptyMVar @@ -540,10 +527,6 @@ openTempFile' loc tmp_dir template binary mode = do | last a == pathSeparator = a ++ b | otherwise = a ++ [pathSeparator] ++ b -#if __HUGS__ - fdToHandle fd = openFd (fromIntegral fd) False ReadWriteMode binary -#endif - #if defined(__GLASGOW_HASKELL__) data OpenNewFileResult = NewFileCreated CInt diff --git a/libraries/base/System/IO/Error.hs b/libraries/base/System/IO/Error.hs index 6fec277f56..d76205653e 100644 --- a/libraries/base/System/IO/Error.hs +++ b/libraries/base/System/IO/Error.hs @@ -81,13 +81,9 @@ module System.IO.Error ( modifyIOError, ) where -#ifndef __HUGS__ import Control.Exception.Base -#endif -#ifndef __HUGS__ import Data.Either -#endif import Data.Maybe #ifdef __GLASGOW_HASKELL__ @@ -98,10 +94,6 @@ import GHC.IO.Handle.Types import Text.Show #endif -#ifdef __HUGS__ -import Hugs.Prelude(Handle, IOException(..), IOErrorType(..), IO) -#endif - -- | The construct 'tryIOError' @comp@ exposes IO errors which occur within a -- computation, and which are not fully handled. -- @@ -325,7 +317,6 @@ annotateIOError ioe loc hdl path = Nothing `mplus` ys = ys xs `mplus` _ = xs -#ifndef __HUGS__ -- | The 'catchIOError' function establishes a handler that receives any -- 'IOError' raised in the action protected by 'catchIOError'. -- An 'IOError' is caught by @@ -348,5 +339,3 @@ annotateIOError ioe loc hdl path = -- exceptions, use 'Control.Exception.catch' from "Control.Exception". catchIOError :: IO a -> (IOError -> IO a) -> IO a catchIOError = catch -#endif /* !__HUGS__ */ - diff --git a/libraries/base/System/IO/Unsafe.hs b/libraries/base/System/IO/Unsafe.hs index 907e9124b5..18a2d423d7 100644 --- a/libraries/base/System/IO/Unsafe.hs +++ b/libraries/base/System/IO/Unsafe.hs @@ -31,11 +31,6 @@ import GHC.Exception import Control.Exception #endif -#ifdef __HUGS__ -import Hugs.IOExts (unsafePerformIO, unsafeInterleaveIO) -unsafeDupablePerformIO = unsafePerformIO -#endif - -- | A slightly faster version of `System.IO.fixIO` that may not be -- safe to use with multiple threads. The unsafety arises when used -- like this: diff --git a/libraries/base/System/Info.hs b/libraries/base/System/Info.hs index 8655f89109..d387240f74 100644 --- a/libraries/base/System/Info.hs +++ b/libraries/base/System/Info.hs @@ -52,13 +52,6 @@ arch = HOST_ARCH compilerName = "ghc" compilerVersionRaw = __GLASGOW_HASKELL__ -#elif defined(__HUGS__) -#include "platform.h" -os = HOST_OS -arch = HOST_ARCH -compilerName = "hugs" -compilerVersionRaw = 0 -- ToDo - #else #error Unknown compiler name #endif diff --git a/libraries/base/System/Mem.hs b/libraries/base/System/Mem.hs index c6c24b25d6..8bcf37acec 100644 --- a/libraries/base/System/Mem.hs +++ b/libraries/base/System/Mem.hs @@ -24,10 +24,6 @@ module System.Mem ( import Prelude -#ifdef __HUGS__ -import Hugs.IOExts -#endif - #ifdef __GLASGOW_HASKELL__ -- | Triggers an immediate garbage collection foreign import ccall {-safe-} "performMajorGC" performGC :: IO () diff --git a/libraries/base/System/Mem/StableName.hs b/libraries/base/System/Mem/StableName.hs index 18fa63d522..374f01cd37 100644 --- a/libraries/base/System/Mem/StableName.hs +++ b/libraries/base/System/Mem/StableName.hs @@ -44,10 +44,6 @@ import Prelude import Data.Typeable -#ifdef __HUGS__ -import Hugs.Stable -#endif - #ifdef __GLASGOW_HASKELL__ import GHC.IO ( IO(..) ) import GHC.Base ( Int(..), StableName#, makeStableName# diff --git a/libraries/base/System/Mem/Weak.hs b/libraries/base/System/Mem/Weak.hs index 9691649668..f35008647c 100644 --- a/libraries/base/System/Mem/Weak.hs +++ b/libraries/base/System/Mem/Weak.hs @@ -70,11 +70,6 @@ module System.Mem.Weak ( -- $precise ) where -#ifdef __HUGS__ -import Hugs.Weak -import Prelude -#endif - #ifdef __GLASGOW_HASKELL__ import GHC.Weak #endif diff --git a/libraries/base/System/Posix/Internals.hs b/libraries/base/System/Posix/Internals.hs index 106616822e..156ab28e80 100644 --- a/libraries/base/System/Posix/Internals.hs +++ b/libraries/base/System/Posix/Internals.hs @@ -53,16 +53,8 @@ import GHC.IO.Device import {-# SOURCE #-} GHC.IO.Encoding (getFileSystemEncoding) import qualified GHC.Foreign as GHC #endif -#elif __HUGS__ -import Hugs.Prelude (IOException(..), IOErrorType(..)) -import Hugs.IO (IOMode(..)) #endif -#ifdef __HUGS__ -{-# CFILES cbits/PrelIOUtils.c cbits/consUtils.c #-} -#endif - - -- --------------------------------------------------------------------------- -- Debugging the base package |