wgpu-hs-0.4.0.0: WGPU
Safe HaskellSafe-Inferred
LanguageHaskell2010

WGPU.Internal.SMaybe

Description

 
Synopsis

Types

data SMaybe a Source #

Strict version of the Maybe type.

Constructors

SNothing 
SJust !a 

Instances

Instances details
Eq a => Eq (SMaybe a) Source # 
Instance details

Defined in WGPU.Internal.SMaybe

Methods

(==) :: SMaybe a -> SMaybe a -> Bool #

(/=) :: SMaybe a -> SMaybe a -> Bool #

Show a => Show (SMaybe a) Source # 
Instance details

Defined in WGPU.Internal.SMaybe

Methods

showsPrec :: Int -> SMaybe a -> ShowS #

show :: SMaybe a -> String #

showList :: [SMaybe a] -> ShowS #

Functions

fromSMaybe Source #

Arguments

:: a

Default value.

-> SMaybe a

SMaybe from which to return the SJust value if possible.

-> a

SJust value, if present, or the default value, if not.

Return a value from an SMaybe with a default.

This function returns the SJust value from an SMaybe, or the default value if the SMaybe is SNothing.