qrcode-core-0.8.0: QR code library in pure Haskell

Safe HaskellTrustworthy
LanguageHaskell2010

Codec.QRCode.Data.Result

Synopsis

Documentation

newtype Result a Source #

This Maybe wrapper treats Just as success and Nothing as failure. There is no unexpected success <-> failure change.

Differences:

    instance Semigroup/Monoid Maybe where
       Nothing <> (Just x) = Just x
       mempty = Nothing
       stimes 0 (Just x) = Nothing

    instance Semigroup/Monoid Result where
       Nothing <> (Just x) = Nothing
       mempty = Just mempty
       stimes 0 (Just x) = Just (stimes 0 x)
  

Constructors

Result 

Fields

Instances
Monad Result Source # 
Instance details

Defined in Codec.QRCode.Data.Result

Methods

(>>=) :: Result a -> (a -> Result b) -> Result b #

(>>) :: Result a -> Result b -> Result b #

return :: a -> Result a #

fail :: String -> Result a #

Functor Result Source # 
Instance details

Defined in Codec.QRCode.Data.Result

Methods

fmap :: (a -> b) -> Result a -> Result b #

(<$) :: a -> Result b -> Result a #

MonadFix Result Source # 
Instance details

Defined in Codec.QRCode.Data.Result

Methods

mfix :: (a -> Result a) -> Result a #

MonadFail Result Source # 
Instance details

Defined in Codec.QRCode.Data.Result

Methods

fail :: String -> Result a #

Applicative Result Source # 
Instance details

Defined in Codec.QRCode.Data.Result

Methods

pure :: a -> Result a #

(<*>) :: Result (a -> b) -> Result a -> Result b #

liftA2 :: (a -> b -> c) -> Result a -> Result b -> Result c #

(*>) :: Result a -> Result b -> Result b #

(<*) :: Result a -> Result b -> Result a #

Foldable Result Source # 
Instance details

Defined in Codec.QRCode.Data.Result

Methods

fold :: Monoid m => Result m -> m #

foldMap :: Monoid m => (a -> m) -> Result a -> m #

foldr :: (a -> b -> b) -> b -> Result a -> b #

foldr' :: (a -> b -> b) -> b -> Result a -> b #

foldl :: (b -> a -> b) -> b -> Result a -> b #

foldl' :: (b -> a -> b) -> b -> Result a -> b #

foldr1 :: (a -> a -> a) -> Result a -> a #

foldl1 :: (a -> a -> a) -> Result a -> a #

toList :: Result a -> [a] #

null :: Result a -> Bool #

length :: Result a -> Int #

elem :: Eq a => a -> Result a -> Bool #

maximum :: Ord a => Result a -> a #

minimum :: Ord a => Result a -> a #

sum :: Num a => Result a -> a #

product :: Num a => Result a -> a #

Traversable Result Source # 
Instance details

Defined in Codec.QRCode.Data.Result

Methods

traverse :: Applicative f => (a -> f b) -> Result a -> f (Result b) #

sequenceA :: Applicative f => Result (f a) -> f (Result a) #

mapM :: Monad m => (a -> m b) -> Result a -> m (Result b) #

sequence :: Monad m => Result (m a) -> m (Result a) #

Eq1 Result Source # 
Instance details

Defined in Codec.QRCode.Data.Result

Methods

liftEq :: (a -> b -> Bool) -> Result a -> Result b -> Bool #

Ord1 Result Source # 
Instance details

Defined in Codec.QRCode.Data.Result

Methods

liftCompare :: (a -> b -> Ordering) -> Result a -> Result b -> Ordering #

Read1 Result Source # 
Instance details

Defined in Codec.QRCode.Data.Result

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Result a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Result a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Result a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Result a] #

Show1 Result Source # 
Instance details

Defined in Codec.QRCode.Data.Result

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Result a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Result a] -> ShowS #

MonadZip Result Source # 
Instance details

Defined in Codec.QRCode.Data.Result

Methods

mzip :: Result a -> Result b -> Result (a, b) #

mzipWith :: (a -> b -> c) -> Result a -> Result b -> Result c #

munzip :: Result (a, b) -> (Result a, Result b) #

Alternative Result Source # 
Instance details

Defined in Codec.QRCode.Data.Result

Methods

empty :: Result a #

(<|>) :: Result a -> Result a -> Result a #

some :: Result a -> Result [a] #

many :: Result a -> Result [a] #

MonadPlus Result Source # 
Instance details

Defined in Codec.QRCode.Data.Result

Methods

mzero :: Result a #

mplus :: Result a -> Result a -> Result a #

Eq a => Eq (Result a) Source # 
Instance details

Defined in Codec.QRCode.Data.Result

Methods

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

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

Data a => Data (Result a) Source # 
Instance details

Defined in Codec.QRCode.Data.Result

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Result a -> c (Result a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Result a) #

toConstr :: Result a -> Constr #

dataTypeOf :: Result a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Result a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Result a)) #

gmapT :: (forall b. Data b => b -> b) -> Result a -> Result a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Result a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Result a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Result a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Result a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Result a -> m (Result a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Result a -> m (Result a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Result a -> m (Result a) #

Ord a => Ord (Result a) Source # 
Instance details

Defined in Codec.QRCode.Data.Result

Methods

compare :: Result a -> Result a -> Ordering #

(<) :: Result a -> Result a -> Bool #

(<=) :: Result a -> Result a -> Bool #

(>) :: Result a -> Result a -> Bool #

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

max :: Result a -> Result a -> Result a #

min :: Result a -> Result a -> Result a #

Read a => Read (Result a) Source # 
Instance details

Defined in Codec.QRCode.Data.Result

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

Defined in Codec.QRCode.Data.Result

Methods

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

show :: Result a -> String #

showList :: [Result a] -> ShowS #

Generic (Result a) Source # 
Instance details

Defined in Codec.QRCode.Data.Result

Associated Types

type Rep (Result a) :: Type -> Type #

Methods

from :: Result a -> Rep (Result a) x #

to :: Rep (Result a) x -> Result a #

Semigroup a => Semigroup (Result a) Source # 
Instance details

Defined in Codec.QRCode.Data.Result

Methods

(<>) :: Result a -> Result a -> Result a #

sconcat :: NonEmpty (Result a) -> Result a #

stimes :: Integral b => b -> Result a -> Result a #

Monoid a => Monoid (Result a) Source # 
Instance details

Defined in Codec.QRCode.Data.Result

Methods

mempty :: Result a #

mappend :: Result a -> Result a -> Result a #

mconcat :: [Result a] -> Result a #

Generic1 Result Source # 
Instance details

Defined in Codec.QRCode.Data.Result

Associated Types

type Rep1 Result :: k -> Type #

Methods

from1 :: Result a -> Rep1 Result a #

to1 :: Rep1 Result a -> Result a #

type Rep (Result a) Source # 
Instance details

Defined in Codec.QRCode.Data.Result

type Rep (Result a) = D1 (MetaData "Result" "Codec.QRCode.Data.Result" "qrcode-core-0.8.0-7NlHM8ffhvy4kQmZRQ755Y" True) (C1 (MetaCons "Result" PrefixI True) (S1 (MetaSel (Just "getResult") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe a))))
type Rep1 Result Source # 
Instance details

Defined in Codec.QRCode.Data.Result

type Rep1 Result = D1 (MetaData "Result" "Codec.QRCode.Data.Result" "qrcode-core-0.8.0-7NlHM8ffhvy4kQmZRQ755Y" True) (C1 (MetaCons "Result" PrefixI True) (S1 (MetaSel (Just "getResult") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Maybe)))

result :: b -> (a -> b) -> Result a -> b Source #