git.iko.soy/typeable/postgresql-simple
on master help sign in
Fix typo in docs

Unfortunately, haddock doesn't seem to be compatible with {-# SOURCE #-} imports, and with the fully qualified linking mechanism I don't know of a way to link to values. So the links to 'field' and 'fieldWith' aren't completely accurate, although at least they do get you to the right module.

commit72b06bd79cbfd1754d72d503262a3281f2071981 authorLeon P Smith <leon@melding-monads.com> dateFri 28 Mar 2014, 16:30 (13 years ago) parent78a8869
2 files changed+9−7
src/Database/PostgreSQL/Simple/FromField.hs+6−3 src/Database/PostgreSQL/Simple/FromRow.hs-boot+3−4
src/Database/PostgreSQL/Simple/FromField.hs+6−3
@@ -27,9 +27,12 @@ Note that the 'Float' and 'Double' instances use attoparsec's 'double'
2727conversion routine, which sacrifices some accuracy for speed. If you
2828need accuracy, consider first converting data to a 'Scientific' or 'Rational'
2929type, and then converting to a floating-point type. If you are defining
30−your own 'ToRow' instances, this can be acheived simply by
31−@'fromRational' '<$>' 'field'@, although this idiom additionally compatible
32−with PostgreSQL's @numeric@ type.
30+your own 'Database.PostgreSQL.Simple.FromRow.FromRow' instances, this can be
31+acheived simply by
32+@'fromRational' '<$>' 'Database.PostgreSQL.Simple.FromRow.field'@, although
33+this idiom is additionally compatible with PostgreSQL's @numeric@ type.
34+If this is unacceptable, you may find
35+'Database.PostgreSQL.Simple.FromRow.fieldWith' useful.
3336
3437Because 'FromField' is a typeclass, one may provide conversions to
3538additional Haskell types without modifying postgresql-simple. This is
src/Database/PostgreSQL/Simple/FromRow.hs-boot+3−4
@@ -8,11 +8,10 @@ class FromRow a
88instance (FromField a) => FromRow (Only a)
99instance (FromField a, FromField b)
1010 => FromRow (a,b)
11−instance (FromField a, FromField b, FromField c, FromField d)
11+instance (FromField a, FromField b, FromField c, FromField d)
1212 => FromRow (a,b,c,d)
13−instance (FromField a, FromField b, FromField c, FromField d, FromField e)
13+instance (FromField a, FromField b, FromField c, FromField d, FromField e)
1414 => FromRow (a,b,c,d,e)
1515instance (FromField a, FromField b, FromField c, FromField d, FromField e
16− ,FromField f)
16+ ,FromField f)
1717 => FromRow (a,b,c,d,e,f)
18−