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

ZkFold.Symbolic.Data.Conditional

Documentation

class BoolType b => Conditional b a where Source #

Minimal complete definition

Nothing

Methods

bool :: a -> a -> b -> a Source #

Properties:

On true
bool onFalse onTrue true == onTrue
On false
bool onFalse onTrue false == onFalse

default bool :: (Generic a, GConditional b (Rep a)) => a -> a -> b -> a Source #

Instances

Instances details
Conditional Bool String Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Conditional

Methods

bool :: String -> String -> Bool -> String Source #

Conditional Bool Bool Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Conditional

Methods

bool :: Bool -> Bool -> Bool -> Bool Source #

Conditional Bool (Zp n) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Conditional

Methods

bool :: Zp n -> Zp n -> Bool -> Zp n Source #

(EllipticCurve curve, bool ~ BooleanOf curve) => Conditional bool (CompressedPoint curve) Source # 
Instance details

Defined in ZkFold.Base.Algebra.EllipticCurve.Class

Methods

bool :: CompressedPoint curve -> CompressedPoint curve -> bool -> CompressedPoint curve Source #

(EllipticCurve curve, bool ~ BooleanOf curve) => Conditional bool (Point curve) Source # 
Instance details

Defined in ZkFold.Base.Algebra.EllipticCurve.Class

Methods

bool :: Point curve -> Point curve -> bool -> Point curve Source #

(Conditional b x0, Conditional b x1) => Conditional b (x0, x1) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Conditional

Methods

bool :: (x0, x1) -> (x0, x1) -> b -> (x0, x1) Source #

Conditional bool field => Conditional bool (Ext2 field i) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Conditional

Methods

bool :: Ext2 field i -> Ext2 field i -> bool -> Ext2 field i Source #

Conditional bool field => Conditional bool (Ext3 field i) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Conditional

Methods

bool :: Ext3 field i -> Ext3 field i -> bool -> Ext3 field i Source #

(KnownNat n, Conditional bool x) => Conditional bool (Vector n x) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Conditional

Methods

bool :: Vector n x -> Vector n x -> bool -> Vector n x Source #

(Conditional b x0, Conditional b x1, Conditional b x2) => Conditional b (x0, x1, x2) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Conditional

Methods

bool :: (x0, x1, x2) -> (x0, x1, x2) -> b -> (x0, x1, x2) Source #

(Conditional b x0, Conditional b x1, Conditional b x2, Conditional b x3) => Conditional b (x0, x1, x2, x3) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Conditional

Methods

bool :: (x0, x1, x2, x3) -> (x0, x1, x2, x3) -> b -> (x0, x1, x2, x3) Source #

Symbolic c => Conditional (Bool c) (Bool c) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Conditional

Methods

bool :: Bool c -> Bool c -> Bool c -> Bool c Source #

Symbolic c => Conditional (Bool c) (FieldElement c) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.FieldElement

(Symbolic c, Traversable f, Representable f) => Conditional (Bool c) (c f) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Conditional

Methods

bool :: c f -> c f -> Bool c -> c f Source #

Symbolic c => Conditional (Bool c) (Proxy c) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Conditional

Methods

bool :: Proxy c -> Proxy c -> Bool c -> Proxy c Source #

(Symbolic c, KnownNat n) => Conditional (Bool c) (ByteString n c) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.ByteString

Methods

bool :: ByteString n c -> ByteString n c -> Bool c -> ByteString n c Source #

Symbolic c => Conditional (Bool c) (FFA p c) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.FFA

Methods

bool :: FFA p c -> FFA p c -> Bool c -> FFA p c Source #

(SymbolicOutput x, Context x ~ c, Conditional (Bool c) x) => Conditional (Bool c) (Maybe c x) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Maybe

Methods

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

(KnownRegisters c n r, Symbolic c) => Conditional (Bool c) (UInt n r c) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.UInt

Methods

bool :: UInt n r c -> UInt n r c -> Bool c -> UInt n r c Source #

ifThenElse :: Conditional b a => b -> a -> a -> a Source #

(?) :: Conditional b a => b -> a -> a -> a Source #

class BoolType b => GConditional b u where Source #

Methods

gbool :: u x -> u x -> b -> u x Source #

Instances

Instances details
Conditional b x => GConditional b (Rec0 x :: k -> Type) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Conditional

Methods

gbool :: forall (x0 :: k0). Rec0 x x0 -> Rec0 x x0 -> b -> Rec0 x x0 Source #

(BoolType b, GConditional b u, GConditional b v) => GConditional b (u :*: v :: k -> Type) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Conditional

Methods

gbool :: forall (x :: k0). (u :*: v) x -> (u :*: v) x -> b -> (u :*: v) x Source #

GConditional b v => GConditional b (M1 i c v :: k -> Type) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Conditional

Methods

gbool :: forall (x :: k0). M1 i c v x -> M1 i c v x -> b -> M1 i c v x Source #