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

ZkFold.Symbolic.Interpreter

Documentation

newtype Interpreter a f Source #

Constructors

Interpreter 

Fields

Instances

Instances details
HApplicative (Interpreter a :: (k -> Type) -> Type) Source # 
Instance details

Defined in ZkFold.Symbolic.Interpreter

Methods

hpure :: (forall (a0 :: k0). f a0) -> Interpreter a f Source #

hunit :: Interpreter a U1 Source #

hap :: forall (f :: k0 -> Type) (g :: k0 -> Type). Interpreter a (Transform f g) -> Interpreter a f -> Interpreter a g Source #

hliftA2 :: (forall (a0 :: k0). f a0 -> g a0 -> h a0) -> Interpreter a f -> Interpreter a g -> Interpreter a h Source #

hpair :: forall (f :: k0 -> Type) (g :: k0 -> Type). Interpreter a f -> Interpreter a g -> Interpreter a (f :*: g) Source #

HFunctor (Interpreter a :: (k -> Type) -> Type) Source # 
Instance details

Defined in ZkFold.Symbolic.Interpreter

Methods

hmap :: (forall (a0 :: k0). f a0 -> g a0) -> Interpreter a f -> Interpreter a g Source #

Package (Interpreter a :: (k1 -> Type) -> Type) Source # 
Instance details

Defined in ZkFold.Symbolic.Interpreter

Methods

unpack :: forall f (g :: k10 -> Type). Functor f => Interpreter a (f :.: g) -> f (Interpreter a g) Source #

unpackWith :: Functor f => (forall (a0 :: k10). h a0 -> f (g a0)) -> Interpreter a h -> f (Interpreter a g) Source #

pack :: forall f (g :: k10 -> Type). (Foldable f, Functor f) => f (Interpreter a g) -> Interpreter a (f :.: g) Source #

packWith :: (Foldable f, Functor f) => (forall (a0 :: k10). f (g a0) -> h a0) -> f (Interpreter a g) -> Interpreter a h Source #

(Eq a, MultiplicativeMonoid a) => Show (Bool (Interpreter a)) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Bool

(Arithmetic a, Field x, Eq x) => DiscreteField (Bool (Interpreter a)) x Source # 
Instance details

Defined in ZkFold.Symbolic.Data.DiscreteField

Methods

isZero :: x -> Bool (Interpreter a) Source #

ToJSON (ByteString n (Interpreter (Zp p))) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.ByteString

ToConstant (ByteString n (Interpreter (Zp p))) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.ByteString

Associated Types

type Const (ByteString n (Interpreter (Zp p))) Source #

(KnownNat p, Arithmetic a) => ToConstant (FFA p (Interpreter a)) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.FFA

Associated Types

type Const (FFA p (Interpreter a)) Source #

Methods

toConstant :: FFA p (Interpreter a) -> Const (FFA p (Interpreter a)) Source #

Arithmetic a => Symbolic (Interpreter a) Source # 
Instance details

Defined in ZkFold.Symbolic.Interpreter

Associated Types

type BaseField (Interpreter a) Source #

type WitnessField (Interpreter a) Source #

Methods

witnessF :: Functor f => Interpreter a f -> f (WitnessField (Interpreter a)) Source #

fromCircuitF :: forall (f :: Type -> Type) (g :: Type -> Type). Interpreter a f -> CircuitFun '[f] g (Interpreter a) -> Interpreter a g Source #

sanityF :: BaseField (Interpreter a) ~ a0 => Interpreter a f -> (f a0 -> g a0) -> (Interpreter a f -> Interpreter a g) -> Interpreter a g Source #

FromJSON (f a) => FromJSON (Interpreter a f) Source # 
Instance details

Defined in ZkFold.Symbolic.Interpreter

(Symbolic (Interpreter (Zp p)), KnownNat n, KnownRegisterSize r) => ToJSON (UInt n r (Interpreter (Zp p))) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.UInt

Methods

toJSON :: UInt n r (Interpreter (Zp p)) -> Value #

toEncoding :: UInt n r (Interpreter (Zp p)) -> Encoding #

toJSONList :: [UInt n r (Interpreter (Zp p))] -> Value #

toEncodingList :: [UInt n r (Interpreter (Zp p))] -> Encoding #

ToJSON (f a) => ToJSON (Interpreter a f) Source # 
Instance details

Defined in ZkFold.Symbolic.Interpreter

Generic (Interpreter a f) Source # 
Instance details

Defined in ZkFold.Symbolic.Interpreter

Associated Types

type Rep (Interpreter a f) :: Type -> Type #

Methods

from :: Interpreter a f -> Rep (Interpreter a f) x #

to :: Rep (Interpreter a f) x -> Interpreter a f #

Show (f a) => Show (Interpreter a f) Source # 
Instance details

Defined in ZkFold.Symbolic.Interpreter

Methods

showsPrec :: Int -> Interpreter a f -> ShowS #

show :: Interpreter a f -> String #

showList :: [Interpreter a f] -> ShowS #

NFData (f a) => NFData (Interpreter a f) Source # 
Instance details

Defined in ZkFold.Symbolic.Interpreter

Methods

rnf :: Interpreter a f -> () #

Eq (f a) => Eq (Interpreter a f) Source # 
Instance details

Defined in ZkFold.Symbolic.Interpreter

Methods

(==) :: Interpreter a f -> Interpreter a f -> Bool #

(/=) :: Interpreter a f -> Interpreter a f -> Bool #

(Symbolic (Interpreter (Zp p)), KnownNat n, KnownRegisterSize r) => ToConstant (UInt n r (Interpreter (Zp p))) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.UInt

Associated Types

type Const (UInt n r (Interpreter (Zp p))) Source #

Methods

toConstant :: UInt n r (Interpreter (Zp p)) -> Const (UInt n r (Interpreter (Zp p))) Source #

type Const (ByteString n (Interpreter (Zp p))) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.ByteString

type Const (FFA p (Interpreter a)) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.FFA

type Const (FFA p (Interpreter a)) = Zp p
type BaseField (Interpreter a) Source # 
Instance details

Defined in ZkFold.Symbolic.Interpreter

type BaseField (Interpreter a) = a
type WitnessField (Interpreter a) Source # 
Instance details

Defined in ZkFold.Symbolic.Interpreter

type Rep (Interpreter a f) Source # 
Instance details

Defined in ZkFold.Symbolic.Interpreter

type Rep (Interpreter a f) = D1 ('MetaData "Interpreter" "ZkFold.Symbolic.Interpreter" "symbolic-base-0.1.0.0-inplace" 'True) (C1 ('MetaCons "Interpreter" 'PrefixI 'True) (S1 ('MetaSel ('Just "runInterpreter") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (f a))))
type Const (UInt n r (Interpreter (Zp p))) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.UInt

type Const (UInt n r (Interpreter (Zp p))) = Natural

Orphan instances

Arithmetic a => Witness a a Source # 
Instance details

Methods

at :: a -> a Source #