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
getSingleton :: forall a. f a -> a