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

fail ∷ String → StrictMaybe a

Foldable StrictMaybe Source # 
Instance details

Defined in Data.Maybe.Strict

Methods

fold ∷ Monoid m ⇒ StrictMaybe m → m

foldMap ∷ Monoid 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

elem ∷ Eq a ⇒ a → StrictMaybe a → Bool

maximum ∷ Ord a ⇒ StrictMaybe a → a

minimum ∷ Ord a ⇒ StrictMaybe a → a

sum ∷ Num a ⇒ StrictMaybe a → a

product ∷ Num a ⇒ StrictMaybe a → a

Traversable StrictMaybe Source # 
Instance details

Defined in Data.Maybe.Strict

Methods

traverse ∷ Applicative f ⇒ (a → f b) → StrictMaybe a → f (StrictMaybe b)

sequenceA ∷ Applicative f ⇒ StrictMaybe (f a) → f (StrictMaybe a)

mapM ∷ Monad m ⇒ (a → m b) → StrictMaybe a → m (StrictMaybe b)

sequence ∷ Monad 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

Methods

(<>)StrictMaybe a → StrictMaybe a → StrictMaybe a

sconcat ∷ NonEmpty (StrictMaybe a) → StrictMaybe a

stimes ∷ Integral b ⇒ b → StrictMaybe a → StrictMaybe a

Generic (StrictMaybe a) Source # 
Instance details

Defined in Data.Maybe.Strict

Associated Types

type Rep (StrictMaybe a) ∷ Type → Type

Methods

fromStrictMaybe a → Rep (StrictMaybe a) x

to ∷ Rep (StrictMaybe a) x → StrictMaybe a

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

Defined in Data.Maybe.Strict

Methods

showsPrec ∷ Int → StrictMaybe a → ShowS

showStrictMaybe a → String

showList ∷ [StrictMaybe a] → ShowS

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

Defined in Data.Maybe.Strict

Methods

fromCBORDecoder s (StrictMaybe a) Source #

label ∷ Proxy (StrictMaybe a) → Text Source #

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

Methods

compareStrictMaybe a → StrictMaybe a → Ordering

(<)StrictMaybe a → StrictMaybe a → Bool

(<=)StrictMaybe a → StrictMaybe a → Bool

(>)StrictMaybe a → StrictMaybe a → Bool

(>=)StrictMaybe a → StrictMaybe a → Bool

maxStrictMaybe a → StrictMaybe a → StrictMaybe a

minStrictMaybe a → StrictMaybe a → StrictMaybe a

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

Defined in Data.Maybe.Strict

Methods

noThunksContextStrictMaybe a → IO (Maybe ThunkInfo) Source #

wNoThunksContextStrictMaybe a → IO (Maybe ThunkInfo) Source #

showTypeOf ∷ Proxy (StrictMaybe a) → String Source #

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) (U1 ∷ Type → Type) :+: C1 ('MetaCons "SJust" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a)))

Conversion: StrictMaybe -- Maybe

Accessing the underlying value

fromSMaybe ∷ a → StrictMaybe a → a Source #

Same as fromMaybe

isSNothingStrictMaybe a → Bool Source #

Same as isNothing

isSJustStrictMaybe a → Bool Source #

Same as isJust

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

Same as maybe