The proxy type $\text{Proxy}(\alpha)$ carries a phantom type parameter $\alpha$ but contains no data. It is the terminal object in the category of types: every type has exactly one function into $\text{Proxy}(\alpha)$.
$$\text{Proxy} : \text{Type}\; u \to \text{Type}$$
Instances For
Equations
Instances For
Equations
- Data.instInhabitedProxy = { default := Data.instInhabitedProxy.default }
BEq instance for $\text{Proxy}(\alpha)$ — always true since there is only one value.
Equations
- Data.Proxy.instBEq = { beq := fun (x x_1 : Data.Proxy α) => true }
Ord instance for $\text{Proxy}(\alpha)$ — always Ordering.eq since all values are equal.
Equations
- Data.Proxy.instOrd = { compare := fun (x x_1 : Data.Proxy α) => Ordering.eq }
Repr instance for $\text{Proxy}(\alpha)$, displaying as Proxy.mk.
Equations
- Data.Proxy.instRepr = { reprPrec := fun (x : Data.Proxy α) (x_1 : Nat) => Std.Format.text "Proxy.mk" }
Hashable instance for $\text{Proxy}(\alpha)$ — always hashes to $0$.
Equations
- Data.Proxy.instHashable = { hash := fun (x : Data.Proxy α) => 0 }
ToString instance for $\text{Proxy}(\alpha)$.
Equations
- Data.Proxy.instToString = { toString := fun (x : Data.Proxy α) => "Proxy" }
Functor instance for $\text{Proxy}$. Since $\text{Proxy}$ carries no data,
map is the identity on the structure:
$$\text{map}\; f\; \text{Proxy.mk} = \text{Proxy.mk}$$
Equations
- Data.Proxy.instFunctor = { map := fun {α β : Type ?u.13} (x : α → β) (x_1 : Data.Proxy α) => { } }
Bind instance for $\text{Proxy}$:
$$\text{bind}\; \text{Proxy.mk}\; f = \text{Proxy.mk}$$
Equations
- Data.Proxy.instBind = { bind := fun {α β : Type ?u.9} (x : Data.Proxy α) (x_1 : α → Data.Proxy β) => { } }
Seq instance for $\text{Proxy}$:
$$\text{seq}\; \text{Proxy.mk}\; f = \text{Proxy.mk}$$
Equations
- Data.Proxy.instSeq = { seq := fun {α β : Type ?u.10} (x : Data.Proxy (α → β)) (x_1 : Unit → Data.Proxy α) => { } }
SeqLeft instance for $\text{Proxy}$.
Equations
- Data.Proxy.instSeqLeft = { seqLeft := fun {α β : Type ?u.9} (x : Data.Proxy α) (x_1 : Unit → Data.Proxy β) => { } }
SeqRight instance for $\text{Proxy}$.
Equations
- Data.Proxy.instSeqRight = { seqRight := fun {α β : Type ?u.9} (x : Data.Proxy α) (x_1 : Unit → Data.Proxy β) => { } }
Applicative instance for $\text{Proxy}$.
Equations
- One or more equations did not get rendered due to their size.
Monad instance for $\text{Proxy}$.
Equations
- Data.Proxy.instMonad = { toApplicative := Data.Proxy.instApplicative, toBind := Data.Proxy.instBind }
Functor composition law: $\text{map}\;(f \circ g) = \text{map}\;f \circ \text{map}\;g$.
$$\text{map}\;(f \circ g)\;\text{Proxy.mk} = \text{map}\;f\;(\text{map}\;g\;\text{Proxy.mk})$$
Associativity: $\text{bind}\;(\text{bind}\;m\;f)\;g = \text{bind}\;m\;(\lambda x.\;\text{bind}\;(f\;x)\;g)$.
For $\text{Proxy}$, all sides reduce to $\text{Proxy.mk}$.