summaryrefslogtreecommitdiff
path: root/libraries
diff options
context:
space:
mode:
authorRichard Eisenberg <eir@cis.upenn.edu>2014-06-10 17:44:32 -0400
committerRichard Eisenberg <eir@cis.upenn.edu>2014-06-11 09:27:42 -0400
commit9dbf3409716fe0ec2a57688124d1ee903db77f0e (patch)
tree55c665a21dc3f2956f767db82364d953883fbc53 /libraries
parent7b10d013a50a9fe4f100a2cb8b02a28e8d398357 (diff)
downloadhaskell-9dbf3409716fe0ec2a57688124d1ee903db77f0e.tar.gz
Fix #9111.
Data.Typeable.Internal should now derive instances for all types defined in modules beneath it. Still to do: Typeable instances for type literals, but that's a very separate matter.
Diffstat (limited to 'libraries')
-rw-r--r--libraries/base/Data/Typeable/Internal.hs59
1 files changed, 57 insertions, 2 deletions
diff --git a/libraries/base/Data/Typeable/Internal.hs b/libraries/base/Data/Typeable/Internal.hs
index fa18bf9c60..1bee846a73 100644
--- a/libraries/base/Data/Typeable/Internal.hs
+++ b/libraries/base/Data/Typeable/Internal.hs
@@ -50,6 +50,7 @@ module Data.Typeable.Internal (
import GHC.Base
import GHC.Word
import GHC.Show
+import GHC.Read ( Read )
import Data.Maybe
import Data.Proxy
import GHC.Num
@@ -57,13 +58,20 @@ import GHC.Real
-- import GHC.IORef
-- import GHC.IOArray
-- import GHC.MVar
-import GHC.ST ( ST )
+import GHC.ST ( ST, STret )
import GHC.STRef ( STRef )
import GHC.Ptr ( Ptr, FunPtr )
-- import GHC.Stable
-import GHC.Arr ( Array, STArray )
+import GHC.Arr ( Array, STArray, Ix )
import Data.Type.Coercion
import Data.Type.Equality
+import Text.ParserCombinators.ReadP ( ReadP )
+import Text.Read.Lex ( Lexeme, Number )
+import Text.ParserCombinators.ReadPrec ( ReadPrec )
+import GHC.Float ( FFFormat, RealFloat, Floating )
+import Data.Bits ( Bits, FiniteBits )
+import GHC.Enum ( Bounded, Enum )
+import Control.Monad ( MonadPlus )
-- import Data.Int
import GHC.Fingerprint.Type
@@ -316,6 +324,7 @@ deriving instance Typeable IO
deriving instance Typeable Array
deriving instance Typeable ST
+deriving instance Typeable STret
deriving instance Typeable STRef
deriving instance Typeable STArray
@@ -351,8 +360,54 @@ deriving instance Typeable Word64
deriving instance Typeable TyCon
deriving instance Typeable TypeRep
+deriving instance Typeable Fingerprint
deriving instance Typeable RealWorld
deriving instance Typeable Proxy
+deriving instance Typeable KProxy
deriving instance Typeable (:~:)
deriving instance Typeable Coercion
+
+deriving instance Typeable ReadP
+deriving instance Typeable Lexeme
+deriving instance Typeable Number
+deriving instance Typeable ReadPrec
+
+deriving instance Typeable FFFormat
+
+-------------------------------------------------------
+--
+-- Generate Typeable instances for standard classes
+--
+-------------------------------------------------------
+
+deriving instance Typeable (~)
+deriving instance Typeable Coercible
+deriving instance Typeable TestEquality
+deriving instance Typeable TestCoercion
+
+deriving instance Typeable Eq
+deriving instance Typeable Ord
+
+deriving instance Typeable Bits
+deriving instance Typeable FiniteBits
+deriving instance Typeable Num
+deriving instance Typeable Real
+deriving instance Typeable Integral
+deriving instance Typeable Fractional
+deriving instance Typeable RealFrac
+deriving instance Typeable Floating
+deriving instance Typeable RealFloat
+
+deriving instance Typeable Bounded
+deriving instance Typeable Enum
+deriving instance Typeable Ix
+
+deriving instance Typeable Show
+deriving instance Typeable Read
+
+deriving instance Typeable Functor
+deriving instance Typeable Monad
+deriving instance Typeable MonadPlus
+
+deriving instance Typeable Typeable