@@ -3,6 +3,7 @@
33-- | NOTE: Binary keys aren't supported yet.
44module Database.IndexedDB.IDBKey.Internal
55 ( Key(..)
6+ , none
67 , class IDBKey, toKey , fromKey , unsafeFromKey
78 , extractForeign
89 ) where
@@ -22,6 +23,7 @@ import Data.List.NonEmpty (NonEmptyList(..))
2223import Data.List.Types (List(..))
2324import Data.NonEmpty (NonEmpty(..))
2425import Data.Either (Either(..), either, isRight)
26+import Data.Maybe (Maybe(..))
2527import Data.Identity (Identity(..))
2628import Data.Nullable (Nullable, toNullable)
2729import Data.Time as Time
@@ -50,6 +52,11 @@ class IDBKey a where
5052 unsafeFromKey :: Key -> a
5153
5254
55+none :: Maybe Key
56+none =
57+ Nothing
58+
59+
5360--------------------
5461-- INSTANCES
5562--