Skip to content

Commit 82c1cd1

Browse files
committed
Add DecidablyEmpty instance for Proxy
1 parent c97c126 commit 82c1cd1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Data/Monoid/DecidablyEmpty.hs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@
33
-- TODO upstream somwhere else?
44
module Data.Monoid.DecidablyEmpty where
55

6+
import Data.Proxy
7+
68
class Monoid a => DecidablyEmpty a where
79
isEmpty :: a -> Bool
810
default isEmpty :: Eq a => a -> Bool
911
isEmpty = (==) mempty
12+
13+
instance DecidablyEmpty (Proxy a) where
14+
isEmpty ~Proxy = True

0 commit comments

Comments
 (0)