Skip to content

Instantly share code, notes, and snippets.

@benkolera
Created February 4, 2020 04:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benkolera/d0ee177b531925fbc5ec7a5a83b0e8c8 to your computer and use it in GitHub Desktop.
Save benkolera/d0ee177b531925fbc5ec7a5a83b0e8c8 to your computer and use it in GitHub Desktop.
backupLocalStorage
:: forall storeKeys m
. ( HasStorage m
, Monad m
, GCompare storeKeys
, UniverseSome storeKeys
, ForallF ToJSON storeKeys
, Has' ToJSON storeKeys Identity
, Has FromJSON storeKeys
, GShow storeKeys
)
=> StoreKeyMetaPrefix
-> Proxy storeKeys
-> Natural -- This version is the expectation set by the caller who has already chosen the key type
-> m (Maybe (DMap storeKeys Identity))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment