witness-0.3: values that witness types

Safe HaskellNone
LanguageHaskell98

Data.Witness.Representative

Synopsis

Documentation

class Eq1 p where Source

Methods

equals1 :: forall a. p a -> p a -> Bool Source

Instances

Eq1 NatKind Nat 
Eq1 * w => Eq1 * (ListType w) 
Eq1 k (Proxy k) 

class Eq1 rep => Representative rep where Source

Methods

getRepWitness :: forall a. rep a -> Dict (Is rep a) Source

Every value is an instance of Is.

withRepresentative :: forall rep r. Representative rep => (forall a. Is rep a => rep a -> r) -> forall b. rep b -> r Source

class Representative rep => Is rep a where Source

If two representatives have the same type, then they have the same value.

Methods

representative :: rep a Source

The representative value for type a.

Instances

Is NatKind Nat Zero 
Is NatKind Nat n => Is NatKind Nat (Succ n) 
Representative * w => Is * (ListType w) () 
Is k (Proxy k) a 
(Is * w a, Is * (ListType w) lt) => Is * (ListType w) (a, lt) 

getRepresentative :: Is rep a => a -> rep a Source

rerepresentative :: Is rep a => p a -> rep a Source

mkAny :: Is rep a => a -> Any rep Source

mkAnyF :: Is rep a => f a -> AnyF rep f Source