@@ -118,7 +118,7 @@ newtype Only a = Only {
118118--
119119-- > query c "select * from whatever where id in ?" (Only (In [3,4,5]))
120120--
121−-- Note that @IN []@ expands to @(null)@, which works as expected in
121+-- Note that @In []@ expands to @(null)@, which works as expected in
122122-- the query above, but evaluates to the logical null value on every
123123-- row instead of @TRUE@. This means that changing the query above
124124-- to @... id NOT in ?@ and supplying the empty list as the parameter
@@ -126,27 +126,27 @@ newtype Only a = Only {
126126--
127127-- Since postgresql doesn't seem to provide a syntax for actually specifying
128128-- an empty list, which could solve this completely, there are two
129−-- workarounds worth mentioning, namely:
129+-- workarounds particularly worth mentioning, namely:
130130--
131−-- 1. Use postgresql-simple's 'Values' instead, which can handle the
131+-- 1. Use postgresql-simple's 'Values' type instead, which can handle the
132132-- empty case correctly. Note however that while specifying the
133133-- postgresql type @"int4"@ is mandatory in the empty case, specifying
134−-- the haskell type @[Int]@ would not normally be needed in realistic
135−-- use cases.
134+-- the haskell type @[Only Int]@ would not normally be needed in
135+-- realistic use cases.
136136--
137−-- > query c "select * from whatever where id not in ?"
138−-- > (Only (Values "int4") ([] :: [Int]))
137+-- > query c "select * from whatever where id not in ?"
138+-- > (Only (Values "int4") ([] :: [Only Int]))
139139--
140140--
141141-- 2. Use sql's @COALESCE@ operator to turn a logical @null@ into the correct
142142-- boolean. Note however that the correct boolean depends on the use
143143-- case:
144144--
145−-- > query c "select * from whatever where coalesce(id NOT in ?, TRUE)"
146−-- > (Only (In ([] :: [Int])))
145+-- > query c "select * from whatever where coalesce(id NOT in ?, TRUE)"
146+-- > (Only (In ([] :: [Int])))
147147--
148−-- > query c "select * from whatever where coalesce(id IN ?, FALSE)"
149−-- > (Only (In ([] :: [Int])))
148+-- > query c "select * from whatever where coalesce(id IN ?, FALSE)"
149+-- > (Only (In ([] :: [Int])))
150150newtype In a = In a
151151 deriving (Eq, Ord, Read, Show, Typeable, Functor)
152152