diff --git a/persistable-record/src/Database/Record/FromSql.hs b/persistable-record/src/Database/Record/FromSql.hs index c8fc1c85..17e6e855 100644 --- a/persistable-record/src/Database/Record/FromSql.hs +++ b/persistable-record/src/Database/Record/FromSql.hs @@ -25,15 +25,14 @@ module Database.Record.FromSql ( maybeRecord, -- * Inference rules of 'RecordFromSql' conversion - FromSql (recordFromSql), recordFromSql', + FromSql (recordFromSql), takeRecord, toRecord, valueFromSql ) where import Database.Record.Persistable - (PersistableRecord, - Persistable(persistable), PersistableType, + (PersistableType, PersistableRecord, PersistableValue, persistableValue, toValue) import qualified Database.Record.Persistable as Persistable import Database.Record.KeyConstraint @@ -90,10 +89,6 @@ createRecordFromSql = RecordFromSql recordDeSerializer :: PersistableRecord q a -> RecordFromSql q a recordDeSerializer = createRecordFromSql . Persistable.takeRecord --- | Inferred 'RecordFromSql' proof object. -recordFromSql' :: Persistable q a => RecordFromSql q a -recordFromSql' = recordDeSerializer persistable - -- | Run 'RecordFromSql' proof object. Convert from list of SQL type ['q'] into Haskell type 'a'. runToRecord :: RecordFromSql q a -- ^ Proof object which has capability to convert -> [q] -- ^ list of SQL type diff --git a/persistable-record/src/Database/Record/ToSql.hs b/persistable-record/src/Database/Record/ToSql.hs index c6853a2b..aa690d46 100644 --- a/persistable-record/src/Database/Record/ToSql.hs +++ b/persistable-record/src/Database/Record/ToSql.hs @@ -23,7 +23,7 @@ module Database.Record.ToSql ( (<&>), -- * Inference rules of 'RecordToSql' conversion - ToSql (recordToSql), recordToSql', + ToSql (recordToSql), putRecord, putEmpty, fromRecord, wrapToSql, valueToSql, @@ -47,7 +47,7 @@ import qualified Data.DList as DList import Database.Record.Persistable (PersistableSqlType, runPersistableNullValue, PersistableType (persistableType), PersistableRecordWidth, runPersistableRecordWidth, PersistableWidth(persistableWidth), - PersistableRecord, Persistable(persistable), PersistableValue, persistableValue, fromValue) + PersistableRecord, PersistableValue, persistableValue, fromValue) import Database.Record.KeyConstraint (Primary, Unique, KeyConstraint, HasKeyConstraint(keyConstraint), unique, indexes) import qualified Database.Record.Persistable as Persistable @@ -84,10 +84,6 @@ createRecordToSql f = wrapToSql $ tell . DList.fromList . f recordSerializer :: PersistableRecord q a -> RecordToSql q a recordSerializer = createRecordToSql . Persistable.fromRecord --- | Inferred 'RecordToSql' proof object. -recordToSql' :: Persistable q a => RecordToSql q a -recordToSql' = recordSerializer persistable - -- | Derivation rule of 'RecordToSql' proof object for Haskell tuple (,) type. (<&>) :: RecordToSql q a -> RecordToSql q b -> RecordToSql q (a, b) ra <&> rb = RecordToSql $ \(a, b) -> do