git.iko.soy/purescript-indexed-DB
on master help sign in
add IDBKey instance to Key
commit302a9f31af325cc804dd9bab2edb0b9854117390 authorKtorZ <matthias.benkort@gmail.com> dateFri 30 Jun 2017, 11:30 (9 years ago) parentea5183d
1 file changed+6
src/Database/IndexedDB/IDBKey/Internal.purs+6
src/Database/IndexedDB/IDBKey/Internal.purs+6
@@ -88,6 +88,12 @@ instance showKey :: Show Key where
8888 either (const "(Key)") (\s -> "(Key " <> s <> ")") x
8989
9090
91+instance idbKeyKey :: IDBKey Key where
92+ toKey = id
93+ fromKey = pure
94+ unsafeFromKey = id
95+
96+
9197instance idbKeyInt :: IDBKey Int where
9298 toKey = Foreign.toForeign >>> Key
9399 fromKey (Key f) = Foreign.readInt f