@@ -188,36 +188,50 @@ toThereTag Tag {..} = Tag {..}
190-- | Test if a 'TheseTable' was constructed with 'thisTable'.
190-- | Test if a 'TheseTable' was constructed with 'thisTable'.
192+-- Corresponds to 'Data.These.Combinators.isThis'.
191isThisTable :: TheseTable a b -> Expr Bool
193isThisTable :: TheseTable a b -> Expr Bool
192isThisTable a = hasHereTable a &&. not_ (hasThereTable a)
194isThisTable a = hasHereTable a &&. not_ (hasThereTable a)
195-- | Test if a 'TheseTable' was constructed with 'thatTable'.
197-- | Test if a 'TheseTable' was constructed with 'thatTable'.
199+-- Corresponds to 'Data.These.Combinators.isThat'.
196isThatTable :: TheseTable a b -> Expr Bool
200isThatTable :: TheseTable a b -> Expr Bool
197isThatTable a = not_ (hasHereTable a) &&. hasThereTable a
201isThatTable a = not_ (hasHereTable a) &&. hasThereTable a
200-- | Test if a 'TheseTable' was constructed with 'thoseTable'.
204-- | Test if a 'TheseTable' was constructed with 'thoseTable'.
206+-- Corresponds to 'Data.These.Combinators.isThese'.
201isThoseTable :: TheseTable a b -> Expr Bool
207isThoseTable :: TheseTable a b -> Expr Bool
202isThoseTable a = hasHereTable a &&. hasThereTable a
208isThoseTable a = hasHereTable a &&. hasThereTable a
205−-- | Test if the @a@ table of @TheseTable a b@ is present.
211+-- | Test if the @a@ side of @TheseTable a b@ is present.
213+-- Corresponds to 'Data.These.Combinators.hasHere'.
206hasHereTable :: TheseTable a b -> Expr Bool
214hasHereTable :: TheseTable a b -> Expr Bool
207hasHereTable TheseTable {here} = isJustTable here
215hasHereTable TheseTable {here} = isJustTable here
210-- | Test if the @b@ table of @TheseTable a b@ is present.
218-- | Test if the @b@ table of @TheseTable a b@ is present.
220+-- Corresponds to 'Data.These.Combinators.hasThere'.
211hasThereTable :: TheseTable a b -> Expr Bool
221hasThereTable :: TheseTable a b -> Expr Bool
212hasThereTable TheseTable {there} = isJustTable there
222hasThereTable TheseTable {there} = isJustTable there
215-- | Attempt to project out the @a@ table of a @TheseTable a b@.
225-- | Attempt to project out the @a@ table of a @TheseTable a b@.
227+-- Corresponds to 'Data.These.Combinators.justHere'.
216justHereTable :: TheseTable a b -> MaybeTable a
228justHereTable :: TheseTable a b -> MaybeTable a
217justHereTable = here
229justHereTable = here
220-- | Attempt to project out the @b@ table of a @TheseTable a b@.
232-- | Attempt to project out the @b@ table of a @TheseTable a b@.
234+-- Corresponds to 'Data.These.Combinators.justThere'.
221justThereTable :: TheseTable a b -> MaybeTable b
235justThereTable :: TheseTable a b -> MaybeTable b
222justThereTable = there
236justThereTable = there
@@ -237,7 +251,7 @@ thoseTable :: a -> b -> TheseTable a b
237thoseTable a b = TheseTable (justTable a) (justTable b)
251thoseTable a b = TheseTable (justTable a) (justTable b)
240−-- | Pattern match on a 'TheseTable'.
254+-- | Pattern match on a 'TheseTable'. Corresponds to 'these'.
241theseTable :: Table Expr c
255theseTable :: Table Expr c
242 => (a -> c) -> (b -> c) -> (a -> b -> c) -> TheseTable a b -> c
256 => (a -> c) -> (b -> c) -> (a -> b -> c) -> TheseTable a b -> c
243theseTable f g h TheseTable {here, there} =
257theseTable f g h TheseTable {here, there} =
@@ -252,9 +266,9 @@ theseTable f g h TheseTable {here, there} =
252-- 'TableSchema'.
266-- 'TableSchema'.
253nameTheseTable :: ()
267nameTheseTable :: ()
254 => Name (Maybe MaybeTag)
268 => Name (Maybe MaybeTag)
255− -- ^ The name of the column to track the presence of 'thisTable'.
269+ -- ^ The name of the column to track the presence of the @a@ table.
256 -> Name (Maybe MaybeTag)
270 -> Name (Maybe MaybeTag)
257− -- ^ The name of the column to track the presence of 'thatTable'.
271+ -- ^ The name of the column to track the presence of the @b@ table.
259 -- ^ Names of the columns in the @a@ table.
273 -- ^ Names of the columns in the @a@ table.