Module

Data.Functor.Singleton

Package
purescript-monad-control
Repository
athanclark/purescript-monad-control

#SingletonFunctor Source

class (Functor f) <= SingletonFunctor f  where

Instances must follow these laws:

inverse :: forall f a. Applicative f => Prop
inverse =
     (getSingleton :: f a -> a) <<< (pure :: a -> f a)
  == (id :: a -> a)

viaconst :: forall f a b. Functor f => Prop
viaconst = forall (x :: b). forall (xs :: f a).
     (getSingleton :: f b -> b) <<< (map (const x) :: f a -> f b)
  == (const x :: f a -> b)

Members

Instances

#liftWith_ Source

liftWith_ :: forall b stT m t. MonadTransControl m t stT => SingletonFunctor stT => Monad m => ((forall a. t m a -> m a) -> m b) -> t m b

#liftBaseWith_ Source

liftBaseWith_ :: forall b stM m base. MonadBaseControl base m stM => SingletonFunctor stM => Functor base => ((forall a. m a -> base a) -> base b) -> m b