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.
13 files changed:
-- * Type representations
TypeRep, -- abstract, instance of: Eq, Show, Typeable
TyCon, -- abstract, instance of: Eq, Show, Typeable
-- * Type representations
TypeRep, -- abstract, instance of: Eq, Show, Typeable
TyCon, -- abstract, instance of: Eq, Show, Typeable
-- * Construction of type representations
mkTyCon, -- :: String -> TyCon
-- * Construction of type representations
mkTyCon, -- :: String -> TyCon
showChar ' ' .
showArgs tys
showChar ' ' .
showArgs tys
+showsTypeRep :: TypeRep -> ShowS
+showsTypeRep = shows
+
instance Show TyCon where
showsPrec _ (TyCon _ s) = showString s
instance Show TyCon where
showsPrec _ (TyCon _ s) = showString s
module Data.Typeable where
import GHC.Base
module Data.Typeable where
import GHC.Base
-mkTyCon :: String -> TyCon
-mkTyConApp :: TyCon -> [TypeRep] -> TypeRep
+mkTyCon :: String -> TyCon
+mkTyConApp :: TyCon -> [TypeRep] -> TypeRep
+showsTypeRep :: TypeRep -> ShowS
class Typeable a where
typeOf :: a -> TypeRep
class Typeable a where
typeOf :: a -> TypeRep
import Foreign.C.Types
#endif
import Foreign.C.Types
#endif
-import Control.Monad ( liftM )
import Data.Bits
import Data.Typeable ( Typeable(..), mkTyCon, mkTyConApp )
import Foreign.Storable ( Storable(..) )
import Data.Bits
import Data.Typeable ( Typeable(..), mkTyCon, mkTyConApp )
import Foreign.Storable ( Storable(..) )
#ifdef __GLASGOW_HASKELL__
import GHC.Stable
#ifdef __GLASGOW_HASKELL__
import GHC.Stable
import GHC.Num
import GHC.Int
import GHC.Word
import GHC.Num
import GHC.Int
import GHC.Word
import GHC.Ptr
import GHC.Float
import GHC.Err
import GHC.Ptr
import GHC.Float
import GHC.Err
import GHC.Float
import GHC.Int
import GHC.Float
import GHC.Int
import GHC.Word
class Storable a
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 GHC.Num
import GHC.Float
import GHC.Ptr
import Control.Monad ( sequence_ )
import Foreign.Storable
import Control.Monad ( sequence_ )
import Foreign.Storable
-import Numeric ( showHex )
-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.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 GHC.Err
-- |The type 'ForeignPtr' represents references to objects that are
import Foreign.C.Types (CInt)
#ifndef __HADDOCK__
import Foreign.C.Types (CInt)
#ifndef __HADDOCK__
-import {-# SOURCE #-} GHC.Dynamic
+import {-# SOURCE #-} Data.Typeable ( showsTypeRep )
+import {-# SOURCE #-} Data.Dynamic ( Dynamic, dynTypeRep )
#endif
-- ---------------------------------------------------------------------------
#endif
-- ---------------------------------------------------------------------------
, writeWord64OffPtr
) where
, writeWord64OffPtr
) where
-import GHC.Stable ( StablePtr )
+import GHC.Stable ( StablePtr(..) )
import GHC.Int
import GHC.Word
import GHC.Int
import GHC.Word
import GHC.Ptr
import GHC.Float
import GHC.IOBase
import GHC.Ptr
import GHC.Float
import GHC.IOBase
GHC.Conc,
GHC.ConsoleHandler,
GHC.Dotnet,
GHC.Conc,
GHC.ConsoleHandler,
GHC.Dotnet,
GHC.Enum,
GHC.Err,
GHC.Exception,
GHC.Enum,
GHC.Err,
GHC.Exception,