@@ -177,13 +177,7 @@ ifilter f tabulation = snd <$> do
177 filter (uncurry f) `postbind` indexed tabulation
177 filter (uncurry f) `postbind` indexed tabulation
180−-- | Map a 'Query' over the input side of a 'Tabulation'. In particular, you
180+-- | Map a 'Query' over the input side of a 'Tabulation'.
181−-- can turn a @'Tabulation' k a@ into a @'Tabulation' k a@ (for use with
182−-- 'leftAlign' and friends) by 'prebind'ing with 'queryTable', like this:
185−-- tabulation `'prebind'` 'queryTable'
187prebind :: (a -> Tabulation k b) -> Query a -> Tabulation k b
181prebind :: (a -> Tabulation k b) -> Query a -> Tabulation k b
188prebind f as = Tabulation $ \k -> do
182prebind f as = Tabulation $ \k -> do
@@ -242,7 +236,7 @@ alignWith f kas kbs = do
242-- | If 'zip' makes an @INNER JOIN@, then 'leftAlign' makes a @LEFT JOIN@.
236-- | If 'zip' makes an @INNER JOIN@, then 'leftAlign' makes a @LEFT JOIN@.
243-- This means it will return at least one row for every row in the left
237-- This means it will return at least one row for every row in the left
244-- 'Tabulation', even if there is no corresponding row in the right (hence the
238-- 'Tabulation', even if there is no corresponding row in the right (hence the
245−-- 'MaybeTable').
239+-- 'Rel8.MaybeTable').
247-- Analagous to
241-- Analagous to
248-- [@rpadZip@](https://hackage.haskell.org/package/semialign/docs/Data-Semialign.html#v:rpadZip).
242-- [@rpadZip@](https://hackage.haskell.org/package/semialign/docs/Data-Semialign.html#v:rpadZip).
@@ -268,9 +262,9 @@ leftAlignWith f left right = liftA2 f left (optionalTabulation right)
269-- You can think of it as @'Data.Map.Strict.intersectionWith'
263-- You can think of it as @'Data.Map.Strict.intersectionWith'
270-- ('Control.Applicative.liftA2' (,))@. That is, @intersect@ the two
264-- ('Control.Applicative.liftA2' (,))@. That is, @intersect@ the two
271−-- `Tabulation`s by 'match'ing their keys together, and combine their values
265+-- `Tabulation`s by matching their keys together (with 'Rel8.==:'), and combine
272−-- (remembering that 'Tabulation' is a 'MultiMap' so that the values are keys)
266+-- their values (remembering that 'Tabulation' is a 'MultiMap' so that the
273−-- by getting their cartesian product.
267+-- values are keys) by getting their cartesian product.
275-- You can think of it as performing a cross product of the underlying 'Query's
269-- You can think of it as performing a cross product of the underlying 'Query's
276-- of the given 'Tabulation's and filtering the results for 'match'ing keys.
270-- of the given 'Tabulation's and filtering the results for 'match'ing keys.
@@ -305,7 +299,7 @@ zipWith = liftA2
305-- each entry would contain the /product/ of the number of rows of their
299-- each entry would contain the /product/ of the number of rows of their
306-- respective entries in @x@ and @y@.
300-- respective entries in @x@ and @y@.
308−-- See 'with'.
302+-- See 'Rel8.with'.
309similarity :: EqTable k => Tabulation k a -> Tabulation k b -> Tabulation k a
303similarity :: EqTable k => Tabulation k a -> Tabulation k b -> Tabulation k a
310similarity kas kbs = do
304similarity kas kbs = do
311 as <- toQuery kas
305 as <- toQuery kas
@@ -317,7 +311,7 @@ similarity kas kbs = do
317-- exist in the right 'Tabulation'. This corresponds to an antijoin in
311-- exist in the right 'Tabulation'. This corresponds to an antijoin in
318-- relational algebra.
312-- relational algebra.
320−-- See 'without'.
314+-- See 'Rel8.without'.
321difference :: EqTable k => Tabulation k a -> Tabulation k b -> Tabulation k a
315difference :: EqTable k => Tabulation k a -> Tabulation k b -> Tabulation k a
322difference kas kbs = do
316difference kas kbs = do
323 as <- toQuery kas
317 as <- toQuery kas