Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- data SMaybe sa ma where
- demoteSMaybe :: forall da sa ma. (forall a. sa a -> da) -> SMaybe sa ma -> Maybe da
- class SingMaybe (ca :: ak -> Constraint) (sa :: ak -> Type) (ma :: Maybe ak) where
- singMaybe' :: (forall a. ca a => sa a) -> SMaybe sa ma
- singMaybe :: forall ca sa ma. SingMaybe ca sa ma => (forall a. ca a => sa a) -> SMaybe sa ma
Documentation
data SMaybe sa ma where Source #
Singleton Maybe
.
demoteSMaybe :: forall da sa ma. (forall a. sa a -> da) -> SMaybe sa ma -> Maybe da Source #
class SingMaybe (ca :: ak -> Constraint) (sa :: ak -> Type) (ma :: Maybe ak) where Source #
singMaybe' :: (forall a. ca a => sa a) -> SMaybe sa ma Source #
Instances
SingMaybe (ca :: ak -> Constraint) (sa :: ak -> Type) ('Nothing :: Maybe ak) Source # | |
Defined in Singleraeh.Maybe singMaybe' :: (forall (a :: ak0). ca a => sa a) -> SMaybe sa 'Nothing Source # | |
ca a2 => SingMaybe (ca :: a1 -> Constraint) (sa :: a1 -> Type) ('Just a2 :: Maybe a1) Source # | |
Defined in Singleraeh.Maybe singMaybe' :: (forall (a :: ak). ca a => sa a) -> SMaybe sa ('Just a2) Source # |