Safe Haskell | None |
---|---|
Language | Haskell2010 |
Local storage IO operations
Get and set local storage values from some LocalStorageKey
Synopsis
- newtype LocalStorageKey a = LocalStorageKey {}
- setStorage :: MonadJSM m => Show a => LocalStorageKey a -> a -> m ()
- getStorage :: MonadJSM m => Read a => LocalStorageKey a -> m (Maybe a)
- saveOnChange :: MonadJSM m => Show a => Eq a => LocalStorageKey a -> TVar a -> m ()
- manageLocalStorage :: MonadUnliftIO m => MonadJSM m => Show a => Read a => Eq a => LocalStorageKey a -> a -> m (TVar a)
Documentation
newtype LocalStorageKey a Source #
The key for a specific state kept in local storage
Instances
setStorage :: MonadJSM m => Show a => LocalStorageKey a -> a -> m () Source #
getStorage :: MonadJSM m => Read a => LocalStorageKey a -> m (Maybe a) Source #
saveOnChange :: MonadJSM m => Show a => Eq a => LocalStorageKey a -> TVar a -> m () Source #
manageLocalStorage :: MonadUnliftIO m => MonadJSM m => Show a => Read a => Eq a => LocalStorageKey a -> a -> m (TVar a) Source #