-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Boolean strong typing -- -- Makes sense of your booleans: strong type them! @package kill-bool @version 0.1.0.0 -- | Strongly-typed booleans -- -- Example: -- --
-- type TT = TBool "missing" "present" -- -- isPresent :: TT -- isPresent = mkIs $ Proxy @"present" -- -- is (Proxy @"missing") isPresent == False --module Data.Bool.Kill -- | Strongly-typed Bool data TBool (false :: Symbol) (true :: Symbol) IsFalse :: TBool (false :: Symbol) (true :: Symbol) IsTrue :: TBool (false :: Symbol) (true :: Symbol) -- | Check "if True" is :: forall b f t. ShouldBeVal (ShouldBe (TBool f t) b) => Proxy b -> TBool f t -> Bool -- | Check "if False" isNot :: forall b f t. ShouldBeVal (ShouldBe (TBool f t) b) => Proxy b -> TBool f t -> Bool -- | Create True/False from its name mkIs :: forall b f t. ShouldBeVal (ShouldBe (TBool f t) b) => Proxy b -> TBool f t -- | Create TBool from Bool mkTBool :: forall f t. Bool -> TBool f t type family ShouldBe (tbool :: Type) (a :: Symbol) :: Type class ShouldBeVal a -- | Proxy is a type that holds no data, but has a phantom parameter -- of arbitrary type (or even kind). Its use is to provide type -- information, even though there is no value available of that type (or -- it may be too costly to create one). -- -- Historically, Proxy :: Proxy a is a safer -- alternative to the undefined :: a idiom. -- --
-- >>> Proxy :: Proxy (Void, Int -> Int) -- Proxy ---- -- Proxy can even hold types of higher kinds, -- --
-- >>> Proxy :: Proxy Either -- Proxy ---- --
-- >>> Proxy :: Proxy Functor -- Proxy ---- --
-- >>> Proxy :: Proxy complicatedStructure -- Proxy --data Proxy (t :: k) Proxy :: Proxy (t :: k) instance GHC.Show.Show Data.Bool.Kill.TTrue instance GHC.Show.Show Data.Bool.Kill.TFalse instance Data.Bool.Kill.ShouldBeVal Data.Bool.Kill.TTrue instance Data.Bool.Kill.ShouldBeVal Data.Bool.Kill.TFalse instance (GHC.TypeLits.KnownSymbol f, GHC.TypeLits.KnownSymbol t) => GHC.Show.Show (Data.Bool.Kill.TBool f t)