-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Binary and Hashable instances for TypeRep
--   
--   Binary and Hashable instances for TypeRep
@package concrete-typerep
@version 0.1.0.2


-- | This module defines <a>Binary</a> and <a>Hashable</a> instances for
--   <a>TypeRep</a>. These are defined on a newtype of <a>TypeRep</a>,
--   namely <a>ConcreteTypeRep</a>, for two purposes:
--   
--   <ul>
--   <li>to avoid making orphan instances</li>
--   <li>the <a>Hashable</a> instance for <a>ConcreteTypeRep</a> may not be
--   pure enough for some people's tastes.</li>
--   </ul>
--   
--   As usual with <a>Typeable</a>, this module will typically be used with
--   some variant of <tt>Data.Dynamic</tt>. Two possible uses of this
--   module are:
--   
--   <ul>
--   <li>making hashmaps: <tt>HashMap <a>ConcreteTypeRep</a>
--   Dynamic</tt></li>
--   <li>serializing <tt>Dynamic</tt>s.</li>
--   </ul>
module Data.ConcreteTypeRep

-- | Abstract type providing the functionality of <a>TypeRep</a>, but
--   additionally supporting hashing and serialization.
--   
--   The <a>Eq</a> instance is just the <a>Eq</a> instance for
--   <a>TypeRep</a>, so an analogous guarantee holds: <tt><a>cTypeOf</a> a
--   == <a>cTypeOf</a> b</tt> if and only if <tt>a</tt> and <tt>b</tt> have
--   the same type. The hashing and serialization functions preserve this
--   equality.
data ConcreteTypeRep

-- | "Concrete" version of <a>typeOf</a>.
cTypeOf :: Typeable a => a -> ConcreteTypeRep

-- | Converts to the underlying <a>TypeRep</a>
toTypeRep :: ConcreteTypeRep -> TypeRep

-- | Converts from the underlying <a>TypeRep</a>
fromTypeRep :: TypeRep -> ConcreteTypeRep
instance Typeable ConcreteTypeRep
instance Eq ConcreteTypeRep
instance Binary SerialRep
instance Binary ConcreteTypeRep
instance Hashable ConcreteTypeRep
instance Show ConcreteTypeRep
