summaryrefslogtreecommitdiff
path: root/src/Propellor/Types/Empty.hs
blob: dcd2f4a039ae44cef02c8aad7ed060ca7baf655a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
module Propellor.Types.Empty where

import qualified Data.Map as M
import qualified Data.Set as S

class Empty t where
	isEmpty :: t -> Bool

instance Empty [a] where
	isEmpty = null

instance Empty (M.Map k v) where
	isEmpty = M.null

instance Empty (S.Set v) where
	isEmpty = S.null