Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- isWitnessRepresentative :: Dict (Is rep a) -> rep a
- type Subrepresentative (p :: k -> Type) (q :: k -> Type) = forall (a :: k). p a -> Dict (Is q a)
- withSubrepresentative :: Subrepresentative p q -> p a -> (Is q a => r) -> r
- class Representative rep where
- getRepWitness :: Subrepresentative rep rep
- withRepresentative :: Representative rep => rep a -> (Is rep a => r) -> r
- class Representative rep => Is rep a where
- representative :: rep a
- getRepresentative :: Is rep a => a -> rep a
- rerepresentative :: Is rep a => p a -> rep a
- fromRepWitness :: Dict (Is rep a) -> rep a
- mkSomeOf :: Is rep a => a -> SomeOf rep
- mkSomeFor :: Is rep a => f a -> SomeFor f rep
- typeValue :: forall k (rep :: k -> Type) (a :: k). (Is rep a, WitnessValue rep) => WitnessValueType rep
- matchIs :: forall w a b. (TestEquality w, Is w a, Is w b) => Maybe (a :~: b)
Documentation
isWitnessRepresentative :: Dict (Is rep a) -> rep a Source #
type Subrepresentative (p :: k -> Type) (q :: k -> Type) = forall (a :: k). p a -> Dict (Is q a) Source #
withSubrepresentative :: Subrepresentative p q -> p a -> (Is q a => r) -> r Source #
class Representative rep where Source #
getRepWitness :: Subrepresentative rep rep Source #
Every value is an instance of Is
.
Instances
withRepresentative :: Representative rep => rep a -> (Is rep a => r) -> r Source #
class Representative rep => Is rep a where Source #
If two representatives have the same type, then they have the same value.
representative :: rep a Source #
The representative value for type a
.
Instances
getRepresentative :: Is rep a => a -> rep a Source #
rerepresentative :: Is rep a => p a -> rep a Source #
fromRepWitness :: Dict (Is rep a) -> rep a Source #
typeValue :: forall k (rep :: k -> Type) (a :: k). (Is rep a, WitnessValue rep) => WitnessValueType rep Source #