- class Applied t tab | t -> tab where
- class Unapplied ptab t | ptab -> t where
- unap :: Proxy (t a) -> (Proxy t, Proxy a)
- ap :: Proxy t -> Proxy a -> Proxy (t a)
- asApplied :: Applied ta tab => tab -> Proxy ta -> tab
- unappliedOf :: Unapplied (Proxy tab) t => tab -> Proxy t
- class IsOfBaseType t tab b | t tab -> b
- class AreEqUnapplied ta tb b | ta tb -> b
NOTE: All classes here should be considered closed.
Manipulating Proxy types
A relation between a (maybe-partially-applied) type and that type fully applied.
A relation between a (maybe-partially-applied) type and that type stripped of all its arguments.
When the bare type is ambiguous (e.g.
unapplied (p :: Proxy (m a))), an
overlapping instances type error will be raised.
Proxy tab, strip away all of its arguments, leaving the type
Composing and decomposing Proxy types
Using proxy types with real values
Force the first argument to the fully
applied proxy type of the second, e.g.
let x = (Left 1) `asApplied` (Proxy :: Proxy (Either Double))
:t xx :: Either Double a
Create a proxy value for the completely
unapplied type of
A predicate class that returns
t is a partially-applied
"prefix" type of
tab can be