Safe Haskell | None |
---|---|

Language | Haskell2010 |

## Synopsis

- data List (a :: Type)
- makeList :: IsKey key ns => Value key ns ~ List a => key -> Store ns -> Value key ns
- makeFullStoreKey :: List a -> Word64 -> StoreKey
- append :: Members [Error AppError, ReadStore, WriteStore] r => HasCodec a => a -> List a -> Sem r ()
- delete :: Members [Error AppError, ReadStore, WriteStore] r => HasCodec a => Eq a => a -> List a -> Sem r ()
- deleteWhen :: Members [Error AppError, ReadStore, WriteStore] r => HasCodec a => (a -> Bool) -> List a -> Sem r ()
- foldl :: Members [Error AppError, ReadStore] r => HasCodec a => (b -> a -> b) -> b -> List a -> Sem r b
- toList :: Members [Error AppError, ReadStore] r => HasCodec a => List a -> Sem r [a]
- length :: Members [Error AppError, ReadStore] r => HasCodec a => List a -> Sem r Word64
- elemIndex :: Members [Error AppError, ReadStore] r => HasCodec a => Eq a => a -> List a -> Sem r (Maybe Word64)
- (!!) :: Members [Error AppError, ReadStore] r => HasCodec a => List a -> Word64 -> Sem r (Maybe a)

# Documentation

append :: Members [Error AppError, ReadStore, WriteStore] r => HasCodec a => a -> List a -> Sem r () Source #

delete :: Members [Error AppError, ReadStore, WriteStore] r => HasCodec a => Eq a => a -> List a -> Sem r () Source #

Delete the first occurence in the list.

deleteWhen :: Members [Error AppError, ReadStore, WriteStore] r => HasCodec a => (a -> Bool) -> List a -> Sem r () Source #

Delete an element whenever the predicate evaluates to `True`

foldl :: Members [Error AppError, ReadStore] r => HasCodec a => (b -> a -> b) -> b -> List a -> Sem r b Source #