[commit: haskell98] master: Remove nhc98-specific files and content (f14bdd7)

Ian Lynagh igloo at earth.li
Fri Feb 15 23:57:06 CET 2013


Repository : ssh://darcs.haskell.org//srv/darcs/packages/haskell98

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/f14bdd7a7d970e4081623621e103a019174475c3

>---------------------------------------------------------------

commit f14bdd7a7d970e4081623621e103a019174475c3
Author: Ian Lynagh <ian at well-typed.com>
Date:   Fri Feb 15 20:57:26 2013 +0000

    Remove nhc98-specific files and content

>---------------------------------------------------------------

 Makefile.nhc98    |   19 -------------------
 Prelude.hs        |    7 -------
 Random.hs         |   12 ------------
 cbits/dummy-nhc.c |    1 -
 4 files changed, 0 insertions(+), 39 deletions(-)

diff --git a/Makefile.nhc98 b/Makefile.nhc98
deleted file mode 100644
index 8542291..0000000
--- a/Makefile.nhc98
+++ /dev/null
@@ -1,19 +0,0 @@
-THISPKG	= haskell98
-SEARCH	=
-EXTRA_H_FLAGS   =
-EXTRA_HBC_FLAGS =
-
-DIRS	=
-SRCS	= dummy-nhc.c
-
-# Here are the main rules.
-include ../Makefile.common
-
-# some extra rules
-extra:
-extracfiles:
-
-# Here are any extra dependencies.
-
-# C-files dependencies.
-
diff --git a/Prelude.hs b/Prelude.hs
index 929fc41..ba5a601 100644
--- a/Prelude.hs
+++ b/Prelude.hs
@@ -28,13 +28,6 @@ module Prelude (
         -- *** Tuples
         fst, snd, curry, uncurry,
 
-#if defined(__NHC__)
-        []((:), []),        -- Not legal Haskell 98;
-                            -- ... available through built-in syntax
-        module Data.Tuple,  -- Includes tuple types
-        ()(..),             -- Not legal Haskell 98
-        (->),               -- ... available through built-in syntax
-#endif
 #ifdef __HUGS__
         (:),                -- Not legal Haskell 98
 #endif
diff --git a/Random.hs b/Random.hs
index 32e3384..eea735a 100644
--- a/Random.hs
+++ b/Random.hs
@@ -37,15 +37,9 @@ import Prelude
 
 import Data.Int
 
-#ifdef __NHC__
-import CPUTime          ( getCPUTime )
-import Foreign.Ptr      ( Ptr, nullPtr )
-import Foreign.C        ( CTime, CUInt )
-#else
 import System.CPUTime   ( getCPUTime )
 import Data.Time        ( getCurrentTime, UTCTime(..) )
 import Data.Ratio       ( numerator, denominator )
-#endif
 import Data.Char        ( isSpace, chr, ord )
 import System.IO.Unsafe ( unsafePerformIO )
 import Data.IORef
@@ -54,17 +48,11 @@ import Numeric          ( readDec )
 -- The standard nhc98 implementation of Time.ClockTime does not match
 -- the extended one expected in this module, so we lash-up a quick
 -- replacement here.
-#ifdef __NHC__
-foreign import ccall "time.h time" readtime :: Ptr CTime -> IO CTime
-getTime :: IO (Integer, Integer)
-getTime = do CTime t <- readtime nullPtr;  return (toInteger t, 0)
-#else
 getTime :: IO (Integer, Integer)
 getTime = do
   utc <- getCurrentTime
   let daytime = toRational $ utctDayTime utc
   return $ quotRem (numerator daytime) (denominator daytime)
-#endif
 
 -- | The class 'RandomGen' provides a common interface to random number
 -- generators.
diff --git a/cbits/dummy-nhc.c b/cbits/dummy-nhc.c
deleted file mode 100644
index 14dc3ea..0000000
--- a/cbits/dummy-nhc.c
+++ /dev/null
@@ -1 +0,0 @@
-void nhc_haskell98_dummy (void) {}





More information about the ghc-commits mailing list