cardano-strict-containers-0.1.4.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 Source #

Foldable StrictMaybe Source # 
Instance details

Defined in Data.Maybe.Strict

Methods

foldMonoid m ⇒ StrictMaybe m → m Source #

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

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

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

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

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

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

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

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

toListStrictMaybe a → [a] Source #

nullStrictMaybe a → Bool Source #

lengthStrictMaybe a → Int Source #

elemEq a ⇒ a → StrictMaybe a → Bool Source #

maximumOrd a ⇒ StrictMaybe a → a Source #

minimumOrd a ⇒ StrictMaybe a → a Source #

sumNum a ⇒ StrictMaybe a → a Source #

productNum a ⇒ StrictMaybe a → a Source #

Traversable StrictMaybe Source # 
Instance details

Defined in Data.Maybe.Strict

Methods

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

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

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

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

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 Source #

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

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

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

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

Functor StrictMaybe Source # 
Instance details

Defined in Data.Maybe.Strict

Methods

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

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

Monad StrictMaybe Source # 
Instance details

Defined in Data.Maybe.Strict

Methods

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

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

return ∷ a → StrictMaybe a Source #

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 Source #

Methods

fromStrictMaybe a → Rep (StrictMaybe a) x Source #

toRep (StrictMaybe a) x → StrictMaybe a Source #

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

Defined in Data.Maybe.Strict

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 → () Source #

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

Defined in Data.Maybe.Strict

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.4.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