git.iko.soy/typeable/postgresql-simple
on master help sign in
Merge pull request #24 from sopvop/master

Added ToRow instance for (:.)

commit162d9651deb8b51673a2f4b8ce71afceedcfe0cc authorLeon P Smith <leon@melding-monads.com> dateWed 25 Jul 2012, 09:39 (14 years ago) parent2e985d936e5209
1 file changed+4−1
src/Database/PostgreSQL/Simple/ToRow.hs+4−1
src/Database/PostgreSQL/Simple/ToRow.hs+4−1
@@ -22,7 +22,7 @@ module Database.PostgreSQL.Simple.ToRow
2222 ) where
2323
2424import Database.PostgreSQL.Simple.ToField (Action(..), ToField(..))
25−import Database.PostgreSQL.Simple.Types (Only(..))
25+import Database.PostgreSQL.Simple.Types (Only(..), (:.)(..))
2626
2727-- | A collection type that can be turned into a list of rendering
2828-- 'Action's.
@@ -88,3 +88,6 @@ instance (ToField a, ToField b, ToField c, ToField d, ToField e, ToField f,
8888
8989instance (ToField a) => ToRow [a] where
9090 toRow = map toField
91+
92+instance (ToRow a, ToRow b) => ToRow (a :. b) where
93+ toRow (a :. b) = toRow a ++ toRow b