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 :: k) where #

types of kind * with a representation

Minimal complete definition

typeRep

Methods

typeRep :: TypeRep a #

Instances

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

Methods

typeRep :: TypeRep (f a) a #

Typeable * Bool # 

Methods

typeRep :: TypeRep Bool a #

Typeable * Char # 

Methods

typeRep :: TypeRep Char a #

Typeable * Int # 

Methods

typeRep :: TypeRep Int a #

Typeable * Type # 

Methods

typeRep :: TypeRep Type a #

Typeable * Constraint # 
Typeable * () # 

Methods

typeRep :: TypeRep () a #

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

Methods

typeRep :: TypeRep Either a #

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

Methods

typeRep :: TypeRep (,) a #

Typeable (* -> *) [] # 

Methods

typeRep :: TypeRep [] a #

Typeable (* -> *) Maybe # 

Methods

typeRep :: TypeRep Maybe a #

Typeable (k -> Constraint) (Typeable k) # 

Methods

typeRep :: TypeRep (Typeable k) a #

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

Methods

typeRep :: TypeRep (TypeRep k) a #

Typeable (* -> * -> *) ((->) LiftedRep LiftedRep) # 

type Fun = (->) #

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

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

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

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

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

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

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