----------------------------------------------------------------------------- -- | -- Module : Data.Empty -- Copyright : (c) 2010 John Millikin -- License : BSD3 -- -- Maintainer : jmillikin@gmail.com -- Portability : portable -- -- Class for types with an "empty" value. -- ----------------------------------------------------------------------------- module Data.Empty ( Empty (..) ) where import qualified Control.Applicative as A class Empty a where empty :: a instance Empty () where empty = () instance Empty [a] where empty = [] instance Empty (Maybe a) where empty = Nothing instance Empty (A.ZipList a) where empty = A.ZipList []