symbolic-base-0.1.0.0: ZkFold Symbolic compiler and zero-knowledge proof protocols
Safe HaskellSafe-Inferred
LanguageHaskell2010

ZkFold.Symbolic.Data.Maybe

Documentation

data Maybe context x Source #

Instances

Instances details
Foldable (Maybe context) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Maybe

Methods

fold :: Monoid m => Maybe context m -> m #

foldMap :: Monoid m => (a -> m) -> Maybe context a -> m #

foldMap' :: Monoid m => (a -> m) -> Maybe context a -> m #

foldr :: (a -> b -> b) -> b -> Maybe context a -> b #

foldr' :: (a -> b -> b) -> b -> Maybe context a -> b #

foldl :: (b -> a -> b) -> b -> Maybe context a -> b #

foldl' :: (b -> a -> b) -> b -> Maybe context a -> b #

foldr1 :: (a -> a -> a) -> Maybe context a -> a #

foldl1 :: (a -> a -> a) -> Maybe context a -> a #

toList :: Maybe context a -> [a] #

null :: Maybe context a -> Bool #

length :: Maybe context a -> Int #

elem :: Eq a => a -> Maybe context a -> Bool #

maximum :: Ord a => Maybe context a -> a #

minimum :: Ord a => Maybe context a -> a #

sum :: Num a => Maybe context a -> a #

product :: Num a => Maybe context a -> a #

Traversable (Maybe context) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Maybe

Methods

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

sequenceA :: Applicative f => Maybe context (f a) -> f (Maybe context a) #

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

sequence :: Monad m => Maybe context (m a) -> m (Maybe context a) #

Functor (Maybe context) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Maybe

Methods

fmap :: (a -> b) -> Maybe context a -> Maybe context b #

(<$) :: a -> Maybe context b -> Maybe context a #

(Eq (context Par1), Eq x) => Eq (Maybe context x) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Maybe

Methods

(==) :: Maybe context x -> Maybe context x -> Bool #

(/=) :: Maybe context x -> Maybe context x -> Bool #

(HApplicative c, SymbolicData x, Context x ~ c, Support x ~ Proxy c) => SymbolicData (Maybe c x) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Maybe

Associated Types

type Context (Maybe c x) :: (Type -> Type) -> Type Source #

type Support (Maybe c x) Source #

type Layout (Maybe c x) :: Type -> Type Source #

Methods

pieces :: Maybe c x -> Support (Maybe c x) -> Context (Maybe c x) (Layout (Maybe c x)) Source #

restore :: (Support (Maybe c x) -> Context (Maybe c x) (Layout (Maybe c x))) -> Maybe c x Source #

type Context (Maybe c x) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Maybe

type Context (Maybe c x) = Context (Bool c, x)
type Layout (Maybe c x) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Maybe

type Layout (Maybe c x) = Layout (Bool c, x)
type Support (Maybe c x) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Maybe

type Support (Maybe c x) = Support (Bool c, x)

maybe :: forall a b c. (Symbolic c, SymbolicData b, Context b ~ c) => (Representable (Layout b), Traversable (Layout b)) => b -> (a -> b) -> Maybe c a -> b Source #

just :: Symbolic c => x -> Maybe c x Source #

nothing :: forall x c. (SymbolicData x, Representable (Layout x), Context x ~ c, Symbolic c) => Maybe c x Source #

fromMaybe :: forall c x. HFunctor c => Ring (c (Vector 1)) => SymbolicData x => Context x ~ c => Layout x ~ Vector 1 => x -> Maybe c x -> x Source #

isNothing :: Symbolic c => Maybe c x -> Bool c Source #

isJust :: Maybe c x -> Bool c Source #

find :: forall a c t. (Symbolic c, SymbolicData a, Context a ~ c, Support a ~ Proxy c) => (Representable (Layout a), Traversable (Layout a)) => Foldable t => (a -> Bool c) -> t a -> Maybe c a Source #