open-witness-0.4.0.1: open witnesses

Safe HaskellNone
LanguageHaskell2010

Data.OpenWitness.Typeable

Description

This is an approximate re-implementation of Data.Typeable using open witnesses.

Synopsis

Documentation

class Typeable a where Source #

types of kind * with a representation

Minimal complete definition

typeRep

Methods

typeRep :: TypeRep a Source #

Instances

(Typeable (k1 -> k2) f, Typeable k1 a) => Typeable k2 (f a) Source # 

Methods

typeRep :: TypeRep (f a) a Source #

Typeable * Bool Source # 
Typeable * Char Source # 
Typeable * Int Source # 

Methods

typeRep :: TypeRep Int a Source #

Typeable * Type Source # 
Typeable * Constraint Source # 
Typeable * () Source # 

Methods

typeRep :: TypeRep () a Source #

Typeable (* -> * -> *) (->) Source # 

Methods

typeRep :: TypeRep (->) a Source #

Typeable (* -> * -> *) Either Source # 
Typeable (* -> * -> *) (,) Source # 

Methods

typeRep :: TypeRep (,) a Source #

Typeable (* -> *) [] Source # 

Methods

typeRep :: TypeRep [] a Source #

Typeable (* -> *) Maybe Source # 
Typeable (k -> Constraint) (Typeable k) Source # 

Methods

typeRep :: TypeRep (Typeable k) a Source #

Typeable (k -> *) (TypeRep k) Source # 

Methods

typeRep :: TypeRep (TypeRep k) a Source #

type Fun = (->) Source #

cast :: forall a b. (Typeable a, Typeable b) => a -> Maybe b Source #

gcast :: forall k a b c. (Typeable a, Typeable b) => c a -> Maybe (c b) Source #

mkFunTy :: TypeRep a -> TypeRep b -> TypeRep (a -> b) Source #

given representations of a and b, make a representation of a -> b

funResultTy :: TypeRep (a -> b) -> TypeRep a -> Maybe (TypeRep b) Source #

given representations of a -> b and a, make a representation of b (otherwise not)

mkAppTy :: forall k1 k2 f a. TypeRep f -> TypeRep a -> TypeRep (f a) Source #