cardano-strict-containers-0.1.5.0: Various strict container types
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Maybe.Strict

Description

Strict version of the Maybe type.

Synopsis

Documentation

data StrictMaybe a Source #

Constructors

SNothing 
SJust !a 

Instances

Instances details
MonadFail StrictMaybe Source # 
Instance details

Defined in Data.Maybe.Strict

Methods

failStringStrictMaybe a #

Foldable StrictMaybe Source # 
Instance details

Defined in Data.Maybe.Strict

Methods

foldMonoid m ⇒ StrictMaybe m → m #

foldMapMonoid m ⇒ (a → m) → StrictMaybe a → m #

foldMap'Monoid m ⇒ (a → m) → StrictMaybe a → m #

foldr ∷ (a → b → b) → b → StrictMaybe a → b #

foldr' ∷ (a → b → b) → b → StrictMaybe a → b #

foldl ∷ (b → a → b) → b → StrictMaybe a → b #

foldl' ∷ (b → a → b) → b → StrictMaybe a → b #

foldr1 ∷ (a → a → a) → StrictMaybe a → a #

foldl1 ∷ (a → a → a) → StrictMaybe a → a #

toListStrictMaybe a → [a] #

nullStrictMaybe a → Bool #

lengthStrictMaybe a → Int #

elemEq a ⇒ a → StrictMaybe a → Bool #

maximumOrd a ⇒ StrictMaybe a → a #

minimumOrd a ⇒ StrictMaybe a → a #

sumNum a ⇒ StrictMaybe a → a #

productNum a ⇒ StrictMaybe a → a #

Eq1 StrictMaybe Source # 
Instance details

Defined in Data.Maybe.Strict

Methods

liftEq ∷ (a → b → Bool) → StrictMaybe a → StrictMaybe b → Bool #

Ord1 StrictMaybe Source # 
Instance details

Defined in Data.Maybe.Strict

Methods

liftCompare ∷ (a → b → Ordering) → StrictMaybe a → StrictMaybe b → Ordering #

Read1 StrictMaybe Source # 
Instance details

Defined in Data.Maybe.Strict

Methods

liftReadsPrec ∷ (IntReadS a) → ReadS [a] → IntReadS (StrictMaybe a) #

liftReadList ∷ (IntReadS a) → ReadS [a] → ReadS [StrictMaybe a] #

liftReadPrecReadPrec a → ReadPrec [a] → ReadPrec (StrictMaybe a) #

liftReadListPrecReadPrec a → ReadPrec [a] → ReadPrec [StrictMaybe a] #

Show1 StrictMaybe Source # 
Instance details

Defined in Data.Maybe.Strict

Methods

liftShowsPrec ∷ (Int → a → ShowS) → ([a] → ShowS) → IntStrictMaybe a → ShowS #

liftShowList ∷ (Int → a → ShowS) → ([a] → ShowS) → [StrictMaybe a] → ShowS #

Traversable StrictMaybe Source # 
Instance details

Defined in Data.Maybe.Strict

Methods

traverseApplicative f ⇒ (a → f b) → StrictMaybe a → f (StrictMaybe b) #

sequenceAApplicative f ⇒ StrictMaybe (f a) → f (StrictMaybe a) #

mapMMonad m ⇒ (a → m b) → StrictMaybe a → m (StrictMaybe b) #

sequenceMonad m ⇒ StrictMaybe (m a) → m (StrictMaybe a) #

Alternative StrictMaybe Source # 
Instance details

Defined in Data.Maybe.Strict

Applicative StrictMaybe Source # 
Instance details

Defined in Data.Maybe.Strict

Methods

pure ∷ a → StrictMaybe a #

(<*>)StrictMaybe (a → b) → StrictMaybe a → StrictMaybe b #

liftA2 ∷ (a → b → c) → StrictMaybe a → StrictMaybe b → StrictMaybe c #

(*>)StrictMaybe a → StrictMaybe b → StrictMaybe b #

(<*)StrictMaybe a → StrictMaybe b → StrictMaybe a #

Functor StrictMaybe Source # 
Instance details

Defined in Data.Maybe.Strict

Methods

fmap ∷ (a → b) → StrictMaybe a → StrictMaybe b #

(<$) ∷ a → StrictMaybe b → StrictMaybe a #

Monad StrictMaybe Source # 
Instance details

Defined in Data.Maybe.Strict

Methods

(>>=)StrictMaybe a → (a → StrictMaybe b) → StrictMaybe b #

(>>)StrictMaybe a → StrictMaybe b → StrictMaybe b #

return ∷ a → StrictMaybe a #

FromJSON a ⇒ FromJSON (StrictMaybe a) Source # 
Instance details

Defined in Data.Maybe.Strict

ToJSON a ⇒ ToJSON (StrictMaybe a) Source # 
Instance details

Defined in Data.Maybe.Strict

Semigroup a ⇒ Monoid (StrictMaybe a) Source # 
Instance details

Defined in Data.Maybe.Strict

Semigroup a ⇒ Semigroup (StrictMaybe a) Source # 
Instance details

Defined in Data.Maybe.Strict

Generic (StrictMaybe a) Source # 
Instance details

Defined in Data.Maybe.Strict

Associated Types

type Rep (StrictMaybe a) ∷ TypeType #

Methods

fromStrictMaybe a → Rep (StrictMaybe a) x #

toRep (StrictMaybe a) x → StrictMaybe a #

Read a ⇒ Read (StrictMaybe a) Source # 
Instance details

Defined in Data.Maybe.Strict

Show a ⇒ Show (StrictMaybe a) Source # 
Instance details

Defined in Data.Maybe.Strict

Methods

showsPrecIntStrictMaybe a → ShowS #

showStrictMaybe a → String #

showList ∷ [StrictMaybe a] → ShowS #

FromCBOR a ⇒ FromCBOR (StrictMaybe a) Source # 
Instance details

Defined in Data.Maybe.Strict

ToCBOR a ⇒ ToCBOR (StrictMaybe a) Source # 
Instance details

Defined in Data.Maybe.Strict

Methods

toCBORStrictMaybe a → Encoding Source #

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy (StrictMaybe a) → Size Source #

encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [StrictMaybe a] → Size Source #

Default (StrictMaybe t) Source # 
Instance details

Defined in Data.Maybe.Strict

Methods

defStrictMaybe t Source #

NFData a ⇒ NFData (StrictMaybe a) Source # 
Instance details

Defined in Data.Maybe.Strict

Methods

rnfStrictMaybe a → () #

Eq a ⇒ Eq (StrictMaybe a) Source # 
Instance details

Defined in Data.Maybe.Strict

Methods

(==)StrictMaybe a → StrictMaybe a → Bool #

(/=)StrictMaybe a → StrictMaybe a → Bool #

Ord a ⇒ Ord (StrictMaybe a) Source # 
Instance details

Defined in Data.Maybe.Strict

NoThunks a ⇒ NoThunks (StrictMaybe a) Source # 
Instance details

Defined in Data.Maybe.Strict

type Rep (StrictMaybe a) Source # 
Instance details

Defined in Data.Maybe.Strict

type Rep (StrictMaybe a) = D1 ('MetaData "StrictMaybe" "Data.Maybe.Strict" "cardano-strict-containers-0.1.5.0-inplace" 'False) (C1 ('MetaCons "SNothing" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "SJust" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a)))

Conversion: StrictMaybe -- Maybe

Accessing the underlying value

fromSMaybe ∷ a → StrictMaybe a → a Source #

Same as fromMaybe

strictMaybe ∷ a → (b → a) → StrictMaybe b → a Source #

Same as maybe