Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data ListItem l p a = ListItem {
- tailHash :: l a
- headLayout :: l a
- headPayload :: p a
- data List c x = List {}
- emptyList :: forall context x. SymbolicData x => Context x ~ context => List context x
- null :: forall context x. Symbolic context => List context x -> Bool context
- (.:) :: forall context x. SymbolicOutput x => Context x ~ context => x -> List context x -> List context x
- hashFun :: MonadCircuit i a w m => i -> i -> i -> m i
- uncons :: forall c x. SymbolicOutput x => Context x ~ c => List c x -> (x, List c x)
- head :: SymbolicOutput x => Context x ~ c => List c x -> x
- tail :: SymbolicOutput x => Context x ~ c => List c x -> List c x
- foldl :: forall x y c. (SymbolicOutput x, Context x ~ c, SymbolicOutput y, Context y ~ c, SymbolicFold c) => MorphFrom c (y, x) y -> y -> List c x -> y
- revapp :: forall c x. (SymbolicOutput x, Context x ~ c, SymbolicFold c) => List c x -> List c x -> List c x
- reverse :: (SymbolicOutput x, Context x ~ c, SymbolicFold c) => List c x -> List c x
- last :: (SymbolicOutput x, Context x ~ c, SymbolicFold c) => List c x -> x
- init :: (SymbolicOutput x, Context x ~ c, SymbolicFold c) => List c x -> List c x
- (++) :: (SymbolicOutput x, Context x ~ c, SymbolicFold c) => List c x -> List c x -> List c x
- foldr :: forall c x y. (SymbolicOutput x, Context x ~ c, SymbolicFold c) => (SymbolicOutput y, Context y ~ c) => MorphFrom c (x, y) y -> y -> List c x -> y
- filter :: forall c x. (SymbolicOutput x, Context x ~ c, SymbolicFold c) => MorphFrom c x (Bool c) -> List c x -> List c x
- delete :: forall c x. (SymbolicOutput x, Context x ~ c, SymbolicFold c) => MorphFrom c (x, x) (Bool c) -> x -> List c x -> List c x
- setminus :: forall c x. (SymbolicOutput x, Context x ~ c, SymbolicFold c) => MorphFrom c (x, x) (Bool c) -> List c x -> List c x -> List c x
- singleton :: forall context x. SymbolicOutput x => Context x ~ context => x -> List context x
- (!!) :: forall x c n. (SymbolicOutput x, Context x ~ c, SymbolicFold c) => (KnownNat n, KnownRegisters c n Auto) => List c x -> UInt n Auto c -> x
- concat :: forall c x. (SymbolicOutput x, Context x ~ c, SymbolicFold c) => List c (List c x) -> List c x
Documentation
ListItem | |
|
Instances
Generic1 (ListItem l p :: k -> Type) Source # | |
(Representable l, Representable p) => Representable (ListItem l p) Source # | |
(Functor l, Functor p) => Functor (ListItem l p) Source # | |
(Distributive l, Distributive p) => Distributive (ListItem l p) Source # | |
Defined in ZkFold.Symbolic.Data.List | |
type Rep1 (ListItem l p :: k -> Type) Source # | |
Defined in ZkFold.Symbolic.Data.List type Rep1 (ListItem l p :: k -> Type) = D1 ('MetaData "ListItem" "ZkFold.Symbolic.Data.List" "symbolic-base-0.1.0.0-inplace" 'False) (C1 ('MetaCons "ListItem" 'PrefixI 'True) (S1 ('MetaSel ('Just "tailHash") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 l) :*: (S1 ('MetaSel ('Just "headLayout") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 l) :*: S1 ('MetaSel ('Just "headPayload") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 p)))) | |
type Rep (ListItem l p) Source # | |
Defined in ZkFold.Symbolic.Data.List |
Instances
emptyList :: forall context x. SymbolicData x => Context x ~ context => List context x Source #
TODO: A proof-of-concept where hash == id. Replace id with a proper hash if we need lists to be cryptographically secure.
(.:) :: forall context x. SymbolicOutput x => Context x ~ context => x -> List context x -> List context x infixr 5 Source #
hashFun :: MonadCircuit i a w m => i -> i -> i -> m i Source #
uncons :: forall c x. SymbolicOutput x => Context x ~ c => List c x -> (x, List c x) Source #
TODO: Is there really a nicer way to handle empty lists?
foldl :: forall x y c. (SymbolicOutput x, Context x ~ c, SymbolicOutput y, Context y ~ c, SymbolicFold c) => MorphFrom c (y, x) y -> y -> List c x -> y Source #
revapp :: forall c x. (SymbolicOutput x, Context x ~ c, SymbolicFold c) => List c x -> List c x -> List c x Source #
revapp xs ys = reverse xs ++ ys
reverse :: (SymbolicOutput x, Context x ~ c, SymbolicFold c) => List c x -> List c x Source #
last :: (SymbolicOutput x, Context x ~ c, SymbolicFold c) => List c x -> x Source #
init :: (SymbolicOutput x, Context x ~ c, SymbolicFold c) => List c x -> List c x Source #
(++) :: (SymbolicOutput x, Context x ~ c, SymbolicFold c) => List c x -> List c x -> List c x Source #
foldr :: forall c x y. (SymbolicOutput x, Context x ~ c, SymbolicFold c) => (SymbolicOutput y, Context y ~ c) => MorphFrom c (x, y) y -> y -> List c x -> y Source #
filter :: forall c x. (SymbolicOutput x, Context x ~ c, SymbolicFold c) => MorphFrom c x (Bool c) -> List c x -> List c x Source #
delete :: forall c x. (SymbolicOutput x, Context x ~ c, SymbolicFold c) => MorphFrom c (x, x) (Bool c) -> x -> List c x -> List c x Source #
setminus :: forall c x. (SymbolicOutput x, Context x ~ c, SymbolicFold c) => MorphFrom c (x, x) (Bool c) -> List c x -> List c x -> List c x Source #
singleton :: forall context x. SymbolicOutput x => Context x ~ context => x -> List context x Source #
(!!) :: forall x c n. (SymbolicOutput x, Context x ~ c, SymbolicFold c) => (KnownNat n, KnownRegisters c n Auto) => List c x -> UInt n Auto c -> x Source #
concat :: forall c x. (SymbolicOutput x, Context x ~ c, SymbolicFold c) => List c (List c x) -> List c x Source #