@@ -21,7 +21,7 @@ import Data.Function.Uncurried (Fn2, Fn3, Fn4)
2121import Data.Maybe (Maybe)
2222import Data.Nullable (Nullable, toNullable)
2323
24−import Database.IndexedDB.Core (INDEXED_DB, Index, KeyRange, KeyPath, ObjectStore)
24+import Database.IndexedDB.Core (IDB, Index, KeyRange, KeyPath, ObjectStore)
2525import Database.IndexedDB.IDBIndex.Internal (class IDBIndex, IDBIndexParameters, count, get, getAllKeys, getKey, openCursor, openKeyCursor)
2626import Database.IndexedDB.IDBKey.Internal (Key(Key), extractForeign)
2727
@@ -30,13 +30,13 @@ import Database.IndexedDB.IDBKey.Internal (Key(Key), extractForeign)
3030-- INTERFACES
3131--
3232class IDBObjectStore store where
33− add :: forall value eff. store -> value -> Maybe Key -> Aff (idb :: INDEXED_DB, exception :: EXCEPTION | eff) Key
34− clear :: forall eff. store -> Aff (idb :: INDEXED_DB, exception :: EXCEPTION | eff) Unit
35− createIndex :: forall eff. store -> IndexName -> KeyPath -> IDBIndexParameters -> Eff (idb :: INDEXED_DB, exception :: EXCEPTION | eff) Index
36− delete :: forall eff. store -> KeyRange -> Aff (idb :: INDEXED_DB, exception :: EXCEPTION | eff) Unit
37− deleteIndex :: forall eff. store -> IndexName -> Eff (idb :: INDEXED_DB, exception :: EXCEPTION | eff) Unit
38− index :: forall eff. store -> IndexName -> Eff (idb :: INDEXED_DB, exception :: EXCEPTION | eff) Index
39− put :: forall value eff. store -> value -> Maybe Key -> Aff (idb :: INDEXED_DB, exception :: EXCEPTION | eff) Key
33+ add :: forall value e. store -> value -> Maybe Key -> Aff (idb :: IDB | e) Key
34+ clear :: forall e. store -> Aff (idb :: IDB | e) Unit
35+ createIndex :: forall e. store -> IndexName -> KeyPath -> IDBIndexParameters -> Eff (idb :: IDB, exception :: EXCEPTION | e) Index
36+ delete :: forall e. store -> KeyRange -> Aff (idb :: IDB | e) Unit
37+ deleteIndex :: forall e. store -> IndexName -> Eff (idb :: IDB, exception :: EXCEPTION | e) Unit
38+ index :: forall e. store -> IndexName -> Eff (idb :: IDB, exception :: EXCEPTION | e) Index
39+ put :: forall value e. store -> value -> Maybe Key -> Aff (idb :: IDB | e) Key
4040
4141
4242type IndexName = String
@@ -107,25 +107,25 @@ defaultParameters =
107107--------------------
108108-- FFI
109109--
110−foreign import _add :: forall value eff. Fn3 ObjectStore value (Nullable Foreign) (Aff (idb :: INDEXED_DB, exception :: EXCEPTION | eff) Foreign)
110+foreign import _add :: forall value e. Fn3 ObjectStore value (Nullable Foreign) (Aff (idb :: IDB | e) Foreign)
111111
112112
113113foreign import _autoIncrement :: ObjectStore -> Boolean
114114
115115
116−foreign import _clear :: forall eff. ObjectStore -> Aff (idb :: INDEXED_DB, exception :: EXCEPTION | eff) Unit
116+foreign import _clear :: forall e. ObjectStore -> Aff (idb :: IDB | e) Unit
117117
118118
119−foreign import _createIndex :: forall eff. Fn4 ObjectStore String (Array String) { unique :: Boolean, multiEntry :: Boolean } (Eff (idb :: INDEXED_DB, exception :: EXCEPTION | eff) Index)
119+foreign import _createIndex :: forall e. Fn4 ObjectStore String (Array String) { unique :: Boolean, multiEntry :: Boolean } (Eff (idb :: IDB | e) Index)
120120
121121
122−foreign import _delete :: forall eff. Fn2 ObjectStore KeyRange (Aff (idb :: INDEXED_DB, exception :: EXCEPTION | eff) Unit)
122+foreign import _delete :: forall e. Fn2 ObjectStore KeyRange (Aff (idb :: IDB | e) Unit)
123123
124124
125−foreign import _deleteIndex :: forall eff. Fn2 ObjectStore String (Eff (idb :: INDEXED_DB, exception :: EXCEPTION | eff) Unit)
125+foreign import _deleteIndex :: forall e. Fn2 ObjectStore String (Eff (idb :: IDB | e) Unit)
126126
127127
128−foreign import _index :: forall eff. Fn2 ObjectStore String (Eff (idb :: INDEXED_DB, exception :: EXCEPTION | eff) Index)
128+foreign import _index :: forall e. Fn2 ObjectStore String (Eff (idb :: IDB | e) Index)
129129
130130
131131foreign import _indexNames :: ObjectStore -> Array String
@@ -137,4 +137,4 @@ foreign import _keyPath :: ObjectStore -> Array String
137137foreign import _name :: ObjectStore -> String
138138
139139
140−foreign import _put :: forall value eff. Fn3 ObjectStore value (Nullable Foreign) (Aff (idb :: INDEXED_DB, exception :: EXCEPTION | eff) Foreign)
140+foreign import _put :: forall value e. Fn3 ObjectStore value (Nullable Foreign) (Aff (idb :: IDB | e) Foreign)