A first attempt at removing gratuitous cycles in the base package.
I've removed the useless module GHC.Dynamic, which gets rid of a cycle;
and trimmed off various unnecesary imports.
This also fixes the IsString import problem.
-- * Type representations
TypeRep, -- abstract, instance of: Eq, Show, Typeable
TyCon, -- abstract, instance of: Eq, Show, Typeable
+ showsTypeRep,
-- * Construction of type representations
mkTyCon, -- :: String -> TyCon
showChar ' ' .
showArgs tys
+showsTypeRep :: TypeRep -> ShowS
+showsTypeRep = shows
+
instance Show TyCon where
showsPrec _ (TyCon _ s) = showString s
module Data.Typeable where
import GHC.Base
+import GHC.Show
data TypeRep
data TyCon
-mkTyCon :: String -> TyCon
-mkTyConApp :: TyCon -> [TypeRep] -> TypeRep
+mkTyCon :: String -> TyCon
+mkTyConApp :: TyCon -> [TypeRep] -> TypeRep
+showsTypeRep :: TypeRep -> ShowS
class Typeable a where
typeOf :: a -> TypeRep
import Foreign.C.Types
#endif
-import Control.Monad ( liftM )
import Data.Bits
import Data.Typeable ( Typeable(..), mkTyCon, mkTyConApp )
import Foreign.Storable ( Storable(..) )
#ifdef __GLASGOW_HASKELL__
import GHC.Stable
-import GHC.Err
#endif
#ifdef __HUGS__
import GHC.Num
import GHC.Int
import GHC.Word
-import GHC.Stable
import GHC.Ptr
import GHC.Float
import GHC.Err
import GHC.Float
import GHC.Int
-import GHC.Num
import GHC.Word
class Storable a
+++ /dev/null
-{-# OPTIONS -fno-implicit-prelude #-}
-module GHC.Dynamic (
- Dynamic, TypeRep, dynTypeRep, showsTypeRep
- ) where
-
-import Data.Dynamic ( Dynamic, dynTypeRep )
-import Data.Typeable ( TypeRep )
-import GHC.Show ( ShowS, shows )
-
-showsTypeRep :: TypeRep -> ShowS
-showsTypeRep = shows
+++ /dev/null
-{-# OPTIONS -fno-implicit-prelude #-}
-module GHC.Dynamic (
- Dynamic, TypeRep, dynTypeRep, showsTypeRep
- ) where
-
-import {-# SOURCE #-} Data.Dynamic ( Dynamic, dynTypeRep )
-import {-# SOURCE #-} Data.Typeable ( TypeRep )
-import GHC.Show ( ShowS )
-
-showsTypeRep :: TypeRep -> ShowS
import GHC.Num
import GHC.Float
import GHC.Ptr
+import Data.String
import Control.Monad ( sequence_ )
import Foreign.Storable
-import Numeric ( showHex )
import GHC.Show
-import GHC.Num
-import GHC.List ( null, replicate, length )
+import GHC.List ( null )
import GHC.Base
import GHC.IOBase
import GHC.STRef ( STRef(..) )
-import GHC.Ptr ( Ptr(..), FunPtr, castFunPtrToPtr )
+import GHC.Ptr ( Ptr(..), FunPtr )
import GHC.Err
-- |The type 'ForeignPtr' represents references to objects that are
import Foreign.C.Types (CInt)
#ifndef __HADDOCK__
-import {-# SOURCE #-} GHC.Dynamic
+import {-# SOURCE #-} Data.Typeable ( showsTypeRep )
+import {-# SOURCE #-} Data.Dynamic ( Dynamic, dynTypeRep )
#endif
-- ---------------------------------------------------------------------------
, writeWord64OffPtr
) where
-import GHC.Stable ( StablePtr )
+import GHC.Stable ( StablePtr(..) )
import GHC.Int
import GHC.Word
-import GHC.Stable
import GHC.Ptr
import GHC.Float
import GHC.IOBase
GHC.Conc,
GHC.ConsoleHandler,
GHC.Dotnet,
- GHC.Dynamic,
GHC.Enum,
GHC.Err,
GHC.Exception,