mirror of
https://github.com/ilyakooo0/purescript-indexedDB.git
synced 2024-09-11 06:55:48 +03:00
add sugar 'none' for (Nothing :: Maybe Key)
This commit is contained in:
parent
3c3b1b2f9b
commit
5f9f3413c5
@ -5,4 +5,4 @@ module Database.IndexedDB.IDBKey
|
||||
( module Database.IndexedDB.IDBKey.Internal
|
||||
) where
|
||||
|
||||
import Database.IndexedDB.IDBKey.Internal(Key, class IDBKey, toKey, fromKey, unsafeFromKey)
|
||||
import Database.IndexedDB.IDBKey.Internal(class IDBKey, Key, none, toKey, fromKey, unsafeFromKey)
|
||||
|
@ -3,6 +3,7 @@
|
||||
-- | NOTE: Binary keys aren't supported yet.
|
||||
module Database.IndexedDB.IDBKey.Internal
|
||||
( Key(..)
|
||||
, none
|
||||
, class IDBKey, toKey , fromKey , unsafeFromKey
|
||||
, extractForeign
|
||||
) where
|
||||
@ -22,6 +23,7 @@ import Data.List.NonEmpty (NonEmptyList(..))
|
||||
import Data.List.Types (List(..))
|
||||
import Data.NonEmpty (NonEmpty(..))
|
||||
import Data.Either (Either(..), either, isRight)
|
||||
import Data.Maybe (Maybe(..))
|
||||
import Data.Identity (Identity(..))
|
||||
import Data.Nullable (Nullable, toNullable)
|
||||
import Data.Time as Time
|
||||
@ -50,6 +52,11 @@ class IDBKey a where
|
||||
unsafeFromKey :: Key -> a
|
||||
|
||||
|
||||
none :: Maybe Key
|
||||
none =
|
||||
Nothing
|
||||
|
||||
|
||||
--------------------
|
||||
-- INSTANCES
|
||||
--
|
||||
|
Loading…
Reference in New Issue
Block a user