extra-1.5: Extra functions I use.

Safe HaskellSafe-Inferred

Data.Typeable.Extra

Description

This module extends Data.Typeable with extra functions available in later GHC versions. The package also exports the existing Data.Typeable functions.

Synopsis

Documentation

typeRep :: forall proxy a. Typeable a => proxy a -> TypeRep

Takes a value of type a and returns a concrete representation of that type.

 typeRep (Proxy :: Proxy Int) == typeOf (1 :: Int)

data a :~: b where

Propositional equality. If a :~: b is inhabited by some terminating value, then the type a is the same as the type b. To use this equality in practice, pattern-match on the a :~: b to get out the Refl constructor; in the body of the pattern-match, the compiler knows that a ~ b.

Constructors

Refl :: a :~: a 

Instances

~ * a b => Bounded (:~: a b) 
~ * a b => Enum (:~: a b) 
Eq (:~: a b) 
Ord (:~: a b) 
~ * a b => Read (:~: a b) 
Show (:~: a b) 

data Proxy t

A canonical proxy type

Constructors

Proxy 

Instances

Monad Proxy 
Functor Proxy 
MonadPlus Proxy 
Applicative Proxy 
Alternative Proxy 
Bounded (Proxy s) 
Enum (Proxy s) 
Eq (Proxy s) 
Ord (Proxy s) 
Read (Proxy s) 
Show (Proxy s) 
Ix (Proxy s) 
Monoid (Proxy s)