Polysemy.View
Contents
data View v m a where Source #
A View is an expensive computation that should be cached.
View
Constructors
see :: forall v r. Member (View v) r => Sem r v Source #
viewToState :: forall v s r a. Member (State s) r => (s -> Sem r v) -> Sem (View v ': r) a -> Sem r a Source #
Get a View as an exensive computation over an underlying State effect. This View is only invalidated when the underlying State changes.
State
viewToInput :: forall v i r a. Member (Input i) r => (i -> v) -> Sem (View v ': r) a -> Sem r a Source #
Transform a View into an Input.
Input