packages feed

lol-typing-1.20160822: Language/LOL/Typing/Lib/Data/Empty.hs

module Language.LOL.Typing.Lib.Data.Empty where

import Data.Maybe (Maybe(..))

-- * Class 'Empty'

class Empty a where
	empty :: a

instance Empty () where
	empty = ()
instance (Empty a, Empty b) => Empty (a, b) where
	empty = (empty, empty)
instance Empty [a] where
	empty = []
instance Empty (Maybe a) where
	empty = Nothing