-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Decidable propositions. -- -- This package provides a Dec type. -- --
-- type Neg a = a -> Void -- -- data Dec a -- = Yes a -- | No (Neg a) --@package dec @version 0.0.5 module Data.Type.Dec -- | Intuitionistic negation. type Neg a = a -> Void -- | Decidable (nullary) relations. data Dec a Yes :: a -> Dec a No :: Neg a -> Dec a -- | Class of decidable types. -- --
-- >>> decShow $ Yes () -- "Yes ()" ---- --
-- >>> decShow $ No id -- "No <toVoid>" --decShow :: Show a => Dec a -> String -- | Convert Dec a to Maybe a, forgetting -- the No evidence. decToMaybe :: Dec a -> Maybe a -- | Convert Dec to Bool, forgetting the evidence. decToBool :: Dec a -> Bool -- | Yes, it's boring. boringYes :: Boring a => Dec a -- | No, it's absurd. absurdNo :: Absurd a => Dec a instance Data.Type.Dec.Decidable () instance Data.Type.Dec.Decidable Data.Void.Void instance (Data.Type.Dec.Decidable a, Data.Type.Dec.Decidable b) => Data.Type.Dec.Decidable (a, b) instance Data.Type.Dec.Decidable a => Data.Boring.Boring (Data.Type.Dec.Dec a) instance GHC.Classes.Eq a => GHC.Classes.Eq (Data.Type.Dec.Dec a) instance GHC.Classes.Ord a => GHC.Classes.Ord (Data.Type.Dec.Dec a)