Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data ListItem x a = ListItem {
- tailHash :: Layout x a
- headLayout :: Layout x a
- headPayload :: Payload x 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
- last :: List context x -> x
- (++) :: List context x -> List context x -> List context x
- filter :: (x -> Bool context) -> List context x -> List context x
- delete :: x -> List context x -> List context x
- (\\) :: List context x -> List context x -> List context x
- singleton :: forall context x. SymbolicOutput x => Context x ~ context => x -> List context x
- (!!) :: List context x -> UInt n Auto context -> x
- concat :: List context (List context x) -> List context x
Documentation
ListItem | |
|
Instances
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.
null :: forall context x. Symbolic context => List context x -> Bool context Source #
A list is empty if it's size is 0, in which case the first element of runInvert
is one
.
(.:) :: 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 #
head :: SymbolicOutput x => Context x ~ c => List c x -> x Source #
TODO: Is there really a nicer way to handle empty lists?