singleraeh-0.2.0: raehik's singletons
Safe HaskellSafe-Inferred
LanguageGHC2021

Singleraeh.Maybe

Synopsis

Documentation

data SMaybe sa ma where Source #

Singleton Maybe.

Constructors

SJust :: sa a -> SMaybe sa (Just a) 
SNothing :: SMaybe sa Nothing 

Instances

Instances details
Demotable sa => Demotable (SMaybe sa :: Maybe a -> Type) Source # 
Instance details

Defined in Singleraeh.Maybe

Associated Types

type Demote (SMaybe sa) Source #

Methods

demote :: forall (k1 :: k). SMaybe sa k1 -> Demote (SMaybe sa) Source #

type Demote (SMaybe sa :: Maybe a -> Type) Source # 
Instance details

Defined in Singleraeh.Maybe

type Demote (SMaybe sa :: Maybe a -> Type) = Maybe (Demote sa)

demoteSMaybe :: forall da sa ma. (forall a. sa a -> da) -> SMaybe sa ma -> Maybe da Source #