on develop help sign in
Add default method for DecidablyEmpty.isEmpty
f39c676John Ericson
src/Data/Monoid/DecidablyEmpty.hs+4
@@ -1,5 +1,9 @@
1+{-# LANGUAGE DefaultSignatures #-}
2+
1-- TODO upstream somwhere else?
3-- TODO upstream somwhere else?
2module Data.Monoid.DecidablyEmpty where
4module Data.Monoid.DecidablyEmpty where
3
5
4class Monoid a => DecidablyEmpty a where
6class Monoid a => DecidablyEmpty a where
5 isEmpty :: a -> Bool
7 isEmpty :: a -> Bool
8+ default isEmpty :: Eq a => a -> Bool
9+ isEmpty = (==) mempty