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

ZkFold.Symbolic.Data.Switch

Synopsis

Documentation

data Switch c x Source #

A Switch of a SymbolicData x to context c is a separate Symbolic datatype which has the same layout and payload as x, but is defined in a context c which can differ from Context x.

In other words, it is a useful default Replica of x in context c when nothing else works.

Constructors

Switch 

Fields

Instances

Instances details
(Symbolic c, SymbolicData x) => Conditional (Bool c) (Switch c x) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Switch

Methods

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

(Symbolic c, SymbolicData x) => SymbolicData (Switch c x) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Switch

Associated Types

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

type Support (Switch c x) Source #

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

type Payload (Switch c x) :: Type -> Type Source #

Methods

arithmetize :: Switch c x -> Support (Switch c x) -> Context (Switch c x) (Layout (Switch c x)) Source #

payload :: Switch c x -> Support (Switch c x) -> Payload (Switch c x) (WitnessField (Context (Switch c x))) Source #

restore :: Context (Switch c x) ~ c0 => (Support (Switch c x) -> (c0 (Layout (Switch c x)), Payload (Switch c x) (WitnessField c0))) -> Switch c x Source #

type Context (Switch c x) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Switch

type Context (Switch c x) = c
type Layout (Switch c x) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Switch

type Layout (Switch c x) = Layout x
type Payload (Switch c x) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Switch

type Payload (Switch c x) = Payload x
type Support (Switch c x) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Switch

type Support (Switch c x) = Proxy c