diff --git a/src/Database/IndexedDB/IDBKey.purs b/src/Database/IndexedDB/IDBKey.purs index b2acffb..a622eeb 100644 --- a/src/Database/IndexedDB/IDBKey.purs +++ b/src/Database/IndexedDB/IDBKey.purs @@ -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) diff --git a/src/Database/IndexedDB/IDBKey/Internal.purs b/src/Database/IndexedDB/IDBKey/Internal.purs index 3f034d3..38b3449 100644 --- a/src/Database/IndexedDB/IDBKey/Internal.purs +++ b/src/Database/IndexedDB/IDBKey/Internal.purs @@ -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 --