Safe Haskell | Safe |
---|---|
Language | Haskell98 |
Data.Witness.Representative
- class Eq1 p where
- isWitnessRepresentative :: Dict (Is rep a) -> rep a
- class Eq1 rep => Representative rep where
- withRepresentative :: forall rep r. Representative rep => (forall a. Is rep a => rep a -> r) -> forall b. rep b -> r
- class Representative rep => Is rep a where
- getRepresentative :: Is rep a => a -> rep a
- rerepresentative :: Is rep a => p a -> rep a
- mkAny :: Is rep a => a -> Any rep
- mkAnyF :: Is rep a => f a -> AnyF rep f
Documentation
Minimal complete definition
isWitnessRepresentative :: Dict (Is rep a) -> rep a #
class Eq1 rep => Representative rep where #
Minimal complete definition
Instances
Representative Nat NatType # | |
Representative * w => Representative * (ListType w) # | |
Representative k (Proxy k) # | |
withRepresentative :: forall rep r. Representative rep => (forall a. Is rep a => rep a -> r) -> forall b. rep b -> r #
class Representative rep => Is rep a where #
If two representatives have the same type, then they have the same value.
Minimal complete definition
getRepresentative :: Is rep a => a -> rep a #
rerepresentative :: Is rep a => p a -> rep a #