Module

Data.Smash.Lens

Package
purescript-smash
Repository
paf31/purescript-smash

#label Source

label :: forall rest b a t s l. IsSymbol l => Functor b => RowCons l (FProxy a) rest s => RowCons l (FProxy b) rest t => SProxy l -> Lens (Smash s) (Smash t) a b

A Lens which focuses on the specified label in a Smash product.

#lowerOf Source

lowerOf :: forall a t s. Functor a => Comonad t => Optic (Split a) s t a Identity -> s ~> a

Lower to a comonad identified by an optic.

For example:

lowerOf first
  :: forall g f
   . Functor f
  => Comonad g
  => Day f g ~> f

lowerOf (first <<< second)
  :: forall f g h
   . Functor g
  => Comonad f
  => Comonad h
  => Day (Day f g) h ~> g

#liftCoOf Source

liftCoOf :: forall a t s. Functor a => Comonad t => Optic (Split a) s t a Identity -> (Co a) ~> (Co s)

Lift an action in the Co monad over the specified optic.

For example:

liftCoOf first
  :: forall g f
   . Functor f
  => Comonad g
  => Co f ~> Co (Day f g)

liftCoOf (first <<< second)
  :: forall f g h
   . Functor g
  => Comonad f
  => Comonad h
  => Co g ~> Co (Day (Day f g) h)

#Split Source

newtype Split r f (g :: Type -> Type)

Split a functor into a Day convolution. This is an implementation detail of the lowerOf function.

Constructors

Instances