-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A type class for empty containers -- -- HasEmpty f has a member empty of type forall a. f a @package Empty @version 0.1.0.0 module Control.Empty -- | The class of type of * -> * which may be empty. There is -- only one law for HasEmpty and its enforced by the type. The law is -- that there exists a value in type f for which a is fully generic. This -- alone is often enough to uniquely determine the value for a given, -- data type. -- -- Additional laws for HasEmpty work backwards, empty has a -- relationships with other classes. So if f is a member of one -- of these classes, the following should hold. -- -- class HasEmpty f where empty = empty empty :: forall a. HasEmpty f => f a empty :: (HasEmpty f, Alternative f) => f a coerce :: HasEmpty f => a -> f b isEmpty :: (HasEmpty f, Eq (f a)) => f a -> Bool instance Control.Empty.HasEmpty GHC.Base.Maybe instance Control.Empty.HasEmpty [] instance Control.Empty.HasEmpty GHC.Types.IO instance Control.Empty.HasEmpty GHC.Conc.Sync.STM instance Control.Empty.HasEmpty Data.Proxy.Proxy instance Control.Empty.HasEmpty Data.Semigroup.Option instance Control.Empty.HasEmpty Text.ParserCombinators.ReadP.ReadP instance Control.Empty.HasEmpty Text.ParserCombinators.ReadPrec.ReadPrec instance (GHC.Base.Alternative f, GHC.Base.Alternative g) => Control.Empty.HasEmpty (Data.Functor.Product.Product f g) instance (GHC.Base.Alternative f, GHC.Base.Applicative g) => Control.Empty.HasEmpty (Data.Functor.Compose.Compose f g) instance Control.Empty.HasEmpty Data.IntMap.Base.IntMap instance Control.Empty.HasEmpty (Data.Map.Base.Map k) instance Control.Empty.HasEmpty Data.Sequence.Seq instance Control.Empty.HasEmpty Data.Set.Base.Set