on master help sign in
Correct traverseMaybeTable, s/noTable/nothingTable/
b018385Shane O'Brien
src/Rel8/Query/Maybe.hs+2−1
@@ -79,7 +79,8 @@ bindMaybeTable query (MaybeTable input a) =
79-- you also have the ability to "expand" one row into multiple rows. If the
79-- you also have the ability to "expand" one row into multiple rows. If the
80-- @a -> Query b@ function returns no rows, then the resulting query will also
80-- @a -> Query b@ function returns no rows, then the resulting query will also
81-- have no rows. However, regardless of the given @a -> Query b@ function, if
81-- have no rows. However, regardless of the given @a -> Query b@ function, if
82−-- the input is @noTable@, you will always get exactly one @noTable@ back.
82+-- the input is @nothingTable@, you will always get exactly one @nothingTable@
83+-- back.
83traverseMaybeTable :: (a -> Query b) -> MaybeTable a -> Query (MaybeTable b)
84traverseMaybeTable :: (a -> Query b) -> MaybeTable a -> Query (MaybeTable b)
84traverseMaybeTable query ma@(MaybeTable input _) = do
85traverseMaybeTable query ma@(MaybeTable input _) = do
85 MaybeTable output b <- optional (query =<< catMaybeTable ma)
86 MaybeTable output b <- optional (query =<< catMaybeTable ma)