Add default method for DecidablyEmpty.isEmpty
commitf39c676bc8e6bea39d7a52f5ab2e7e34e6f501a2
authorJohn Ericson <John.Ericson@Obsidian.Systems>
dateWed 22 Jan 2020, 14:40 (7 years ago)
parent510e5e2
src/Data/Monoid/DecidablyEmpty.hs+4
@@ -1,5 +1,9 @@
1+{-# LANGUAGE DefaultSignatures #-}
2+
13-- TODO upstream somwhere else?
24module Data.Monoid.DecidablyEmpty where
35
46class Monoid a => DecidablyEmpty a where
57 isEmpty :: a -> Bool
8+ default isEmpty :: Eq a => a -> Bool
9+ isEmpty = (==) mempty