on develop help sign in
Add decidably empty things
c99f2d2John Ericson
patch.cabal+3−1
@@ -39,7 +39,9 @@ library
39 , transformers >= 0.5.6.0 && < 0.6
39 , transformers >= 0.5.6.0 && < 0.6
40 , witherable >= 0.3 && < 0.3.2
40 , witherable >= 0.3 && < 0.3.2
41
41
42+ exposed-modules: Control.Category.DecidablyEmpty
42− exposed-modules: Data.Functor.Misc
43+ , Data.Functor.Misc
44+ , Data.Monoid.DecidablyEmpty
43 , Data.Patch
45 , Data.Patch
44 , Data.Patch.Class
46 , Data.Patch.Class
45 , Data.Patch.DMap
47 , Data.Patch.DMap
src/Control/Category/DecidablyEmpty.hsnew file+9
@@ -0,0 +1,9 @@
1+{-# LANGUAGE TypeOperators #-}
2+-- TODO upstream somwhere else?
3+module Control.Category.DecidablyEmpty where
4+
5+import Control.Category
6+import Data.Type.Equality
7+
8+class Category c => DecidablyEmpty c where
9+ isId :: c a b -> Maybe (a :~: b)